On Mon, 2016-02-01 at 22:26 +0000, James Cowgill wrote: > But 'char' is unsigned on arm so the while condition is always true. If > nordlicht was compiled with -Wall, gcc would tell you about this: > > > ../main.c: In function 'main': > > ../main.c:112:39: warning: comparison is always true due to limited > > range of data type [-Wtype-limits] > > while ((c = poptGetNextOpt(popt)) >= 0) { } > > ^ > > ../main.c:114:11: warning: comparison is always false due to limited > > range of data type [-Wtype-limits] > > if (c < -1) { > > ^
Oops it turns out you actually need -Wextra to enable this. It's definitely worth it to enable both though. James
signature.asc
Description: This is a digitally signed message part