schwehr / generic-sensor-format

Sonar Generic Sensor Format (gsf) codec
Other
13 stars 8 forks source link

gcc 5 used maybe uninitialized warnings #42

Open schwehr opened 9 years ago

schwehr commented 9 years ago
make clean; make OPTIMIZE=1 all
rm -f *.o
rm -f libgsf.a
gcc-5 -Wall -Wextra -Werror -O3 -funroll-loops -ffast-math -DNDEBUG   -c -o gsf.o gsf.c
gsf.c: In function ‘gsfOpen’:
gsf.c:463:9: error: ‘headerSize’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (fseek(gsfFileTable[fileTableIndex].fp, headerSize, SEEK_SET))
         ^
gsf.c: In function ‘gsfOpenBuffered’:
gsf.c:800:13: error: ‘headerSize’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if (fseek(gsfFileTable[fileTableIndex].fp, headerSize, SEEK_SET))
             ^
cc1: all warnings being treated as errors
make: *** [gsf.o] Error 1