build: fix build with -Werror with GCC 4.6.0
authorJason D. Clinton <me@jasonclinton.com>
Sat, 19 Mar 2011 22:06:12 +0000 (17:06 -0500)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 21 Mar 2011 08:29:19 +0000 (09:29 +0100)
This touches three areas of code, removes unused variables and discards
return values from two functions with (void).

https://bugzilla.gnome.org/show_bug.cgi?id=645267

gst/gstpoll.c
libs/gst/controller/gstinterpolation.c
plugins/elements/gstfilesrc.c

index cbc3904..ba9fdc8 100644 (file)
@@ -200,7 +200,6 @@ release_wakeup (GstPoll * set)
 static inline gint
 release_all_wakeup (GstPoll * set)
 {
-  gboolean result;
   gint old;
 
   while (TRUE) {
@@ -211,7 +210,7 @@ release_all_wakeup (GstPoll * set)
     /* try to remove all pending control messages */
     if (g_atomic_int_compare_and_exchange (&set->control_pending, old, 0)) {
       /* we managed to remove all messages, read the control socket */
-      result = RELEASE_EVENT (set);
+      (void) RELEASE_EVENT (set);
       break;
     }
   }
index c3a4274..54ff60e 100644 (file)
@@ -573,7 +573,7 @@ _interpolate_cubic_update_cache_##vtype (GstInterpolationControlSource *self) \
   \
   GSequenceIter *iter; \
   GstControlPoint *cp; \
-  GstClockTime x_prev, x, x_next; \
+  GstClockTime x, x_next; \
   g##vtype y_prev, y, y_next; \
   \
   /* Fill linear system of equations */ \
@@ -592,7 +592,6 @@ _interpolate_cubic_update_cache_##vtype (GstInterpolationControlSource *self) \
   \
   for (i = 1; i < n-1; i++) { \
     /* Shuffle x and y values */ \
-    x_prev = x; \
     y_prev = y; \
     x = x_next; \
     y = y_next; \
index 16a3e03..cc07a72 100644 (file)
@@ -763,11 +763,11 @@ gst_file_src_create_mmap (GstFileSrc * src, guint64 offset, guint length,
 
   /* if we need to touch the buffer (to bring it into memory), do so */
   if (src->touch) {
-    volatile guchar *p = GST_BUFFER_DATA (buf), c;
+    volatile guchar *p = GST_BUFFER_DATA (buf);
 
     /* read first byte of each page */
     for (i = 0; i < GST_BUFFER_SIZE (buf); i += src->pagesize)
-      c = p[i];
+      (void) p[i];
   }
 
   /* we're done, return the buffer */