1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

sim65 suppress uninitialized variable warning

the EOF check was protecting uninitialized Val2 but the compiler can't figure that out
This commit is contained in:
bbbradsmith 2023-05-05 21:46:42 -04:00
parent 773716c32a
commit c03d00bc80

View File

@ -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);