kinetiknz/nestegg — pull request #15 by shadone (2013-11-26 11:31:26+00:00)
Title: Fix compiler warning.

clang complains about the use of uninitialized variable in a case that should
never trigger (it is protected by an assert).

Warning: -Wsometimes-uninitialized in libnestegg/src/nestegg.c: variable 'r' is used uninitialized whenever switch case is taken
libnestegg/src/nestegg.c:968:8: warning: variable 'r' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case TYPE_MASTER:
^~~~~~~~~~~
libnestegg/src/nestegg.c:974:7: note: uninitialized use occurs here
if (r == 1)
^
Warning: -Wsometimes-uninitialized in libnestegg/src/nestegg.c: variable 'r' is used uninitialized whenever switch case is taken
libnestegg/src/nestegg.c:969:8: warning: variable 'r' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case TYPE_UNKNOWN:
^~~~~~~~~~~~
libnestegg/src/nestegg.c:974:7: note: uninitialized use occurs here
if (r == 1)
^
libnestegg/src/nestegg.c:937:8: note: initialize the variable 'r' to silence this warning
int r;
^
= 0