After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347935 - [nsf] warning when building RPM
[nsf] warning when building RPM
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-18 15:33 UTC by Christian Fredrik Kalager Schaller
Modified: 2006-07-19 11:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Fredrik Kalager Schaller 2006-07-18 15:33:00 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
Comment 1 Tim-Philipp Müller 2006-07-19 11:44:54 UTC
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.