From c03d00bc805ffdda6afe1866d6263e7eef098a39 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Fri, 5 May 2023 21:46:42 -0400 Subject: [PATCH] sim65 suppress uninitialized variable warning the EOF check was protecting uninitialized Val2 but the compiler can't figure that out --- src/sim65/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sim65/main.c b/src/sim65/main.c index 9e371fd5d..27299168e 100644 --- a/src/sim65/main.c +++ b/src/sim65/main.c @@ -189,6 +189,7 @@ static unsigned char ReadProgramFile (void) } /* Get load address */ + Val2 = 0; /* suppress uninitialized variable warning */ if (((Val = fgetc(F)) == EOF) || ((Val2 = fgetc(F)) == EOF)) { Error ("'%s': Header missing load address", ProgramFile);