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 647294 - gst-plugins-base doesn't compile with GCC 4.6
gst-plugins-base doesn't compile with GCC 4.6
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.33
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
: 647474 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-09 17:15 UTC by Marc Plano-Lesay
Modified: 2011-04-24 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Removing many unused variable warnings (9.43 KB, patch)
2011-04-09 17:16 UTC, Marc Plano-Lesay
committed Details | Review
audioconvert tmp-orc.c (163.79 KB, application/octet-stream)
2011-04-11 16:55 UTC, Tim-Philipp Müller
  Details
patch for audioconvert (43.81 KB, patch)
2011-04-11 17:01 UTC, David Schleef
none Details | Review
Fix unused variable warnings in audioresample (1002 bytes, patch)
2011-04-14 07:34 UTC, Marc Plano-Lesay
committed Details | Review

Description Marc Plano-Lesay 2011-04-09 17:15:04 UTC
gst-plugins-base doesn't compile with GCC 4.6 due to unused variables warnings being treated as errors.
Comment 1 Marc Plano-Lesay 2011-04-09 17:16:13 UTC
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]
Comment 2 Tim-Philipp Müller 2011-04-11 16:49:45 UTC
*** Bug 647474 has been marked as a duplicate of this bug. ***
Comment 3 Tim-Philipp Müller 2011-04-11 16:55:00 UTC
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
Comment 4 David Schleef 2011-04-11 17:01:54 UTC
Created attachment 185732 [details] [review]
patch for audioconvert

This should clear up the warnings.  Commit in Orc momentarily.
Comment 5 Tim-Philipp Müller 2011-04-12 11:25:36 UTC
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
Comment 6 Tim-Philipp Müller 2011-04-13 23:28:25 UTC
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
Comment 7 Marc Plano-Lesay 2011-04-14 07:34:04 UTC
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.
Comment 8 Tim-Philipp Müller 2011-04-14 08:31:47 UTC
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).
Comment 9 Marc Plano-Lesay 2011-04-14 08:50:45 UTC
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)
Comment 10 Tim-Philipp Müller 2011-04-24 11:46:43 UTC
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