GNOME Bugzilla – Bug 327355
gst-plugins-bad CVS compilation breaks on gcc 4.1
Last modified: 2006-05-03 21:51:54 UTC
Please describe the problem: cc1: warnings being treated as errors qtdemux.c: In function 'gst_qtdemux_loop_header': qtdemux.c:665: warning: value computed is not used Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
2006-03-09 Tim-Philipp Müller <tim at centricular dot net> * gst/qtdemux/qtdemux.c: (gst_qtdemux_send_event): Fix build with gcc-4.1 (#327355). Was that the only one? Please re-open if there are more.
make[4]: Entering directory `/home/bilboed/work/cvs/gst-plugins-bad/gst/modplug/libmodplug' if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../gst-libs -I../../../gst-libs -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -Wall -Werror -D_REENTRANT -g -O2 -MT libmodplug_la-load_ptm.lo -MD -MP -MF ".deps/libmodplug_la-load_ptm.Tpo" -c -o libmodplug_la-load_ptm.lo `test -f 'load_ptm.cpp' || echo './'`load_ptm.cpp; \ then mv -f ".deps/libmodplug_la-load_ptm.Tpo" ".deps/libmodplug_la-load_ptm.Plo"; else rm -f ".deps/libmodplug_la-load_ptm.Tpo"; exit 1; fi libtool: ignoring unknown tag CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../gst-libs -I../../../gst-libs -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -Wall -Werror -D_REENTRANT -g -O2 -MT libmodplug_la-load_ptm.lo -MD -MP -MF .deps/libmodplug_la-load_ptm.Tpo -c load_ptm.cpp -fPIC -DPIC -o .libs/libmodplug_la-load_ptm.o cc1plus: warnings being treated as errors load_ptm.cpp: In member function 'BOOL CSoundFile::ReadPTM(const BYTE*, DWORD)': load_ptm.cpp:123: warning: dereferencing type-punned pointer will break strict-aliasing rules load_ptm.cpp:124: warning: dereferencing type-punned pointer will break strict-aliasing rules load_ptm.cpp:125: warning: dereferencing type-punned pointer will break strict-aliasing rules load_ptm.cpp:126: warning: dereferencing type-punned pointer will break strict-aliasing rules make[4]: *** [libmodplug_la-load_ptm.lo] Error 1 m
Created attachment 61694 [details] [review] maybe this does the trick (yuk)
2006-03-21 Tim-Philipp Müller <tim at centricular dot net> * gst/modplug/libmodplug/load_ptm.cpp: Fix compilation with gcc-4.1 and -Werror (#327355).
This is not fixed. I am still getting this with current CVS. cc1plus: warnings being treated as errors load_it.cpp: In member function 'UINT CSoundFile::SaveMixPlugins(FILE*, BOOL)': load_it.cpp:1323: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1324: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1325: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1326: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1329: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1350: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1352: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result load_it.cpp:1353: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result make[4]: *** [libmodplug_la-load_it.lo] Error 1
Christian, could you try again now with this: 2006-03-22 Tim-Philipp Müller <tim at centricular dot net> * gst/modplug/libmodplug/Makefile.am: More gcc-4.1 fixes (we don't need file saving, so just define MODPLUG_NO_FILESAVE. That way, the compiler won't complain about modplug ignoring the return value of fwrite any longer and we might even save a few bytes as well).
Fixed now apparently.