From: Raphael N. <rn...@we...> - 2009-01-19 13:12:26
|
Hi, I cannot help you with the wrong behaviour, but the warnings are all correct but can probably safely be ignored. > The output from SDCC is: > app.c:45: warning 166: useless declaration (possible use of keyword as > variable name) > app.c:46: warning 166: useless declaration (possible use of keyword as > variable name) > app.c:48: warning 166: useless declaration (possible use of keyword as > variable name) Declaring "void;" is not too useful. Probably the whole lines should be commented (not only the remaining prototype tokens). > app.c:176: warning 126: unreachable code > app.c:177: warning 126: unreachable code > app.c:177: warning 126: unreachable code > app.c:177: warning 126: unreachable code > app.c:177: warning 126: unreachable code > app.c:178: warning 126: unreachable code > app.c:178: warning 126: unreachable code > app.c:178: warning 126: unreachable code > app.c:178: warning 126: unreachable code > app.c:181: warning 126: unreachable code > app.c:182: warning 126: unreachable code > app.c:182: warning 126: unreachable code > app.c:182: warning 126: unreachable code > app.c:182: warning 126: unreachable code > app.c:184: warning 126: unreachable code > app.c:185: warning 126: unreachable code > app.c:185: warning 126: unreachable code > app.c:185: warning 126: unreachable code > app.c:185: warning 126: unreachable code > app.c:186: warning 126: unreachable code > app.c:186: warning 126: unreachable code > app.c:186: warning 126: unreachable code > app.c:186: warning 126: unreachable code All of these are true if the if-block in 171--173 is (always) used. The static condition statically evaluates to true. But I admit that one warning per unreachable code block would suffice ... > app.c:243: warning 126: unreachable code Code following a while (1) {} *is* unreachable. Correct again. > app.c:275: warning 166: useless declaration (possible use of keyword as > variable name) Again: "void;" *is* useless. > app.c:342: warning 126: unreachable code > app.c:342: warning 126: unreachable code > app.c:343: warning 126: unreachable code > app.c:343: warning 126: unreachable code > app.c:343: warning 126: unreachable code This is correct: These lines are skipped due to the preceeding goto. > app.c:349: warning 166: useless declaration (possible use of keyword as > variable name) > app.c:362: warning 166: useless declaration (possible use of keyword as > variable name) "void;" ... Regards, Raphael |