schwehr / generic-sensor-format

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

Possibly used uninitialized - last_record_number in gsf_indx.c #71

Open schwehr opened 8 years ago

schwehr commented 8 years ago
gcc-5 -Wall -Wextra -pedantic -g -O   -c -o gsf_indx.o gsf_indx.c
gsf_indx.c: In function ‘gsfOpenIndex’:
gsf_indx.c:1260:31: warning: ‘last_record_number’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         data_id.record_number = last_record_number;
                               ^
gsf_indx.c:1067:22: note: ‘last_record_number’ was declared here
     int              last_record_number;
                      ^
gsf_indx.c:1261:13: warning: ‘last_record_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = gsfRead(handle, data_id.recordID, &data_id, &records, NULL, 0);
             ^
gsf_indx.c:1066:22: note: ‘last_record_type’ was declared here
     int              last_record_type;
                      ^