GNOME Bugzilla – Bug 347935
[nsf] warning when building RPM
Last modified: 2006-07-19 11:44:54 UTC
I am getting this warning when trying to build -bad as an RPM. Building within the sourcetree I don't get this warning for some reason. cc1: warnings being treated as errors nsf.c: In function 'nsf_load': nsf.c:479: warning: ignoring return value of 'fread', declared with attribute warn_unused_result make[3]: *** [libgstnsf_la-nsf.lo] Error 1
Should be: --- gst/nsf/nsf.c 18 Jul 2006 09:36:46 -0000 1.2 +++ gst/nsf/nsf.c 19 Jul 2006 11:41:36 -0000 @@ -476,7 +476,7 @@ nsf_load (char *filename, void *source, /* seek to end of header, read in data */ if (NULL == source) { fseek (fp, NSF_HEADER_SIZE, SEEK_SET); - if (fread (temp_nsf->data, temp_nsf->length, 1, fp) < 0) + if (fread (temp_nsf->data, temp_nsf->length, 1, fp) != 1) log_printf ("error reading end of header\n"); fclose (fp); fixed now (hopefully): 2006-07-19 Tim-Philipp Müller <tim at centricular dot net> * gst/nsf/nsf.c: (nsf_load): Really fix compilation. Apparently it's not enough to just check the return value for errors, but we need to check for short reads as well (now if only we handled them too ...). Fixes #347935.