Silence gcc warnings with -O3
Commit
a469a10 (silence some -Wuninitialized false positives) tried to
silence some uninitialized false-positives with a hack. This hack
triggered many more warnings on clang, and eventually gcc 4.9.0 as well.
While more hacks can be used to silence the new warnings, it's much
better to decouple ourselves from such hacks and help the compilers
directly.
We can do that by either initializing the variables, or manually
returning the error value (-1) without depending on error() to do it.
This fixes warnings while compiling with gcc -O3.
parse-options.c: In function ‘get_value’:
parse-options.c:183:24: warning: ‘arg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*(int *)opt->value = strtol(arg, (char **)&s, 10);
^
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>