Compiling under debugger-friendly optimisation produces the following GCC warnings:
gcc -Wall -Og -ggdb -o server.o -c server.c
server.c: In function ‘ProcessJSONClientLine’:
server.c:74:14: warning: ‘s’ may be used uninitialized in this function [-Wmaybe-uninitialized]
channel = *value != '0';
^~
server.c:70:7: warning: ‘s’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (strcasecmp(command, "send") == 0)
^~~~~~~
server.c:60:3: warning: ‘s’ may be used uninitialized in this function [-Wmaybe-uninitialized]
SetConfigValue(setting, value);
^~~~~~~~~~
server.c:60:3: warning: ‘s’ may be used uninitialized in this function [-Wmaybe-uninitialized]
I suspect these are a minor gcc bug, but harmlessly initialising the 'saveptr' pointer removes the warnings.
Compiling under debugger-friendly optimisation produces the following GCC warnings:
I suspect these are a minor gcc bug, but harmlessly initialising the 'saveptr' pointer removes the warnings.