GNOME Bugzilla – Bug 647294
gst-plugins-base doesn't compile with GCC 4.6
Last modified: 2011-04-24 11:54:25 UTC
gst-plugins-base doesn't compile with GCC 4.6 due to unused variables warnings being treated as errors.
Created attachment 185597 [details] [review] Removing many unused variable warnings Don't solve all errors : gstaudioresample.c:1467:39: error: variable 'out' set but not used [-Werror=unused-but-set-variable] gsttypefindfunctions.c: In function 'mp3_type_find_at_offset': gsttypefindfunctions.c:1021:31: error: variable 'prev_bitrate' set but not used [-Werror=unused-but-set-variable] In file included from imgconvert.c:2241:0: imgconvert_template.h: In function 'get_alpha_info_rgb555': imgconvert_template.h:2156:22: error: variable 'b' set but not used [-Werror=unused-but-set-variable] imgconvert_template.h:2156:19: error: variable 'g' set but not used [-Werror=unused-but-set-variable] imgconvert_template.h:2156:16: error: variable 'r' set but not used [-Werror=unused-but-set-variable]
*** Bug 647474 has been marked as a duplicate of this bug. ***
Created attachment 185731 [details] audioconvert tmp-orc.c This is for ds: tmp-orc.c: In function 'gst_audio_convert_orc_init': tmp-orc.c:5239:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5263:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5285:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5307:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5327:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5351:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5373:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5394:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5412:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5434:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5454:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5477:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5500:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5523:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5546:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5563:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5582:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5599:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5616:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5641:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5664:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5687:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5708:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5733:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5756:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5778:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5798:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5821:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5842:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5866:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5888:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5910:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5930:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5954:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5976:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:5997:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6015:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6037:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6057:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6078:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6099:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6120:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6141:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6158:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6177:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6202:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6225:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6248:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6269:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6294:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6317:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6339:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6359:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] tmp-orc.c:6382:22: warning: variable 'result' set but not used [-Wunused-but-set-variable] CCLD libgstaudioconvert.la
Created attachment 185732 [details] [review] patch for audioconvert This should clear up the warnings. Commit in Orc momentarily.
Comment on attachment 185597 [details] [review] Removing many unused variable warnings Committed, thanks for the patch: commit bf2b14f8608413fb3cd41215fa5c8fd46d4d597f Author: Marc Plano-Lesay <marc.planolesay@gmail.com> Date: Sat Apr 9 19:15:23 2011 +0200 fix unused-but-set-variable warnings with gcc 4.6 https://bugzilla.gnome.org/show_bug.cgi?id=647294
commit 05dce4e2ac06aab55296a931c43bee079a3acf5e Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Apr 14 00:24:26 2011 +0100 tests: fix unused-but-set-variable warnings with gcc 4.6 https://bugzilla.gnome.org/show_bug.cgi?id=647294 commit be597896646eea46c32549baae5bfb3ff03ccbc3 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Wed Apr 13 23:57:56 2011 +0100 ogg: fix unused-but-set-variable warnings with gcc 4.6 https://bugzilla.gnome.org/show_bug.cgi?id=647294 commit f14c73cbfde9c5d3bc2b43d1f53325315c855825 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Wed Apr 13 23:19:07 2011 +0100 ffmpegcolorspace: fix unused-but-set-variable warnings with gcc 4.6 https://bugzilla.gnome.org/show_bug.cgi?id=647294 commit dd62fdc585902e59c375860c343480d71b6abc72 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Wed Apr 13 22:59:03 2011 +0100 typefindfunctions: fix unused-but-set-variable warning with gcc 4.6 We don't compare the bitrates of consecutive mp3 frames on purpose here. https://bugzilla.gnome.org/show_bug.cgi?id=647294
Created attachment 185932 [details] [review] Fix unused variable warnings in audioresample The only errors left due to unused variables are in the (generated ?) tmp-orc.c files.
Yes, wasn't really sure about the audioresample one - since it's a benchmark, it looks like we should make sure that that code is generated and run? The orc ones are fixed in orc git, and there'll be a new orc version out soon (in any case, these warnings shouldn't cause any problems for pre-releases/releases, since we don't use -Werror for those anyway).
The only thing that make G_GNUC_UNUSED as far as I can see is to set the unused attribute to the variable : «unused This attribute, attached to a variable, means that the variable is meant to be possibly unused. GCC will not produce a warning for this variable.» (see http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Variable-Attributes.html)
Pushed, thanks: commit 2ccd243d5533b46047a44263037645b97e00cd65 Author: Marc Plano-Lesay <marc.planolesay@gmail.com> Date: Thu Apr 14 09:32:19 2011 +0200 audioresample: fix unused-but-set-variable warnings with gcc 4.6 https://bugzilla.gnome.org/show_bug.cgi?id=647294