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 676572 - A small fix for unused variables...
A small fix for unused variables...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-22 15:28 UTC by Sebastian Rasmussen
Modified: 2012-05-24 08:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch for compiler warnings. (2.13 KB, patch)
2012-05-22 15:35 UTC, Sebastian Rasmussen
needs-work Details | Review
Proposed patch for compiler warnings. (2.13 KB, patch)
2012-05-23 17:24 UTC, Sebastian Rasmussen
none Details | Review

Description Sebastian Rasmussen 2012-05-22 15:28:44 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
Comment 1 Sebastian Rasmussen 2012-05-22 15:35:08 UTC
Created attachment 214669 [details] [review]
Proposed patch for compiler warnings.
Comment 2 Sebastian Rasmussen 2012-05-22 15:43:09 UTC
I forgot to mention that I use --disable-gst-debug without --disable-fatal-warnings.
Comment 3 Sebastian Dröge (slomo) 2012-05-23 08:11:17 UTC
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)
Comment 4 Sebastian Rasmussen 2012-05-23 17:23:33 UTC
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. :)
Comment 5 Sebastian Rasmussen 2012-05-23 17:24:31 UTC
Created attachment 214797 [details] [review]
Proposed patch for compiler warnings.
Comment 6 Wim Taymans 2012-05-24 08:54:46 UTC
obsolete, we disable warnings when debug is enabled now