GNOME Bugzilla – Bug 676572
A small fix for unused variables...
Last modified: 2012-05-24 08:54:46 UTC
When trying to compile gstreamer from git with warnings for unused variables compilation fails: CFLAGS="-Wunused-variable" ./autogen.sh; make install .... make[3]: Entering directory `/home/sebrn/src/upstream/gstreamer/gst' CC libgstreamer_1.0_la-gstbufferpool.lo gstbufferpool.c: In function ‘mark_meta_pooled’: gstbufferpool.c:240:18: error: unused variable ‘pool’ [-Werror=unused-variable] cc1: all warnings being treated as errors .... make[2]: Entering directory `/home/sebrn/src/upstream/gstreamer/plugins/elements' CC libgstcoreelements_la-gstqueue.lo gstqueue.c: In function ‘gst_queue_locked_dequeue’: gstqueue.c:676:15: error: unused variable ‘query’ [-Werror=unused-variable] gstqueue.c: In function ‘gst_queue_push_one’: gstqueue.c:1063:21: error: unused variable ‘query’ [-Werror=unused-variable] cc1: all warnings being treated as errors
Created attachment 214669 [details] [review] Proposed patch for compiler warnings.
I forgot to mention that I use --disable-gst-debug without --disable-fatal-warnings.
Review of attachment 214669 [details] [review]: ::: gst/gstbufferpool.c @@ +239,3 @@ { + GST_DEBUG_OBJECT (GST_BUFFER_POOL_CAST (pool), + "marking meta %p as POOLED in buffer %p", *meta, buffer); You probably meant to cast user_data, not pool (which you just removed)
You are correct Sebastian, I'm attaching a new patch. __tim mentioned on IRC that the way I'm trying to compile gstreamer is not the Proper<tm> way (i.e. don't set CFLAGS to -Wunused-variable when compiling with --disable-gst-debug). So maybe you think this patch is unnecessary noise, and if so please set the status of the bug to INVALID or WONTFIX or so. I'm happy either way. :)
Created attachment 214797 [details] [review] Proposed patch for compiler warnings.
obsolete, we disable warnings when debug is enabled now