tests: fix unused-but-set-variable warnings with gcc 4.6
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 13 Apr 2011 23:24:26 +0000 (00:24 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 13 Apr 2011 23:24:26 +0000 (00:24 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=647294

tests/examples/encoding/gstcapslist.c
tests/examples/gio/giosrc-mounting.c
tests/examples/playrec/playrec.c
tests/examples/seek/jsseek.c
tests/examples/seek/seek.c

index 4908e43..aed5821 100644 (file)
@@ -27,7 +27,7 @@ static gboolean
 remove_range_foreach (GQuark field_id, const GValue * value, GstStructure * st)
 {
   GType ftype = G_VALUE_TYPE (value);
-  const gchar *fname;
+  /* const gchar *fname; */
 
   if (ftype == GST_TYPE_INT_RANGE || ftype == GST_TYPE_DOUBLE_RANGE ||
       ftype == GST_TYPE_FRACTION_RANGE) {
@@ -35,8 +35,7 @@ remove_range_foreach (GQuark field_id, const GValue * value, GstStructure * st)
     return FALSE;
   }
 
-  fname = g_quark_to_string (field_id);
-
+  /* fname = g_quark_to_string (field_id); */
   /* if (strstr (fname, "framerate") || strstr (fname, "pixel-aspect-ratio") || */
   /*     strstr (fname, "rate")) { */
   /*   gst_structure_remove_field (st, g_quark_to_string (field_id)); */
index 8ca4a3c..0a8e202 100644 (file)
@@ -119,6 +119,7 @@ main (int argc, char *argv[])
 
   gtk_main ();
 
+  g_source_remove (watch_id);
   gst_element_set_state (pipeline, GST_STATE_NULL);
   gst_object_unref (pipeline);
 
index b1c1a62..352f65a 100644 (file)
@@ -156,6 +156,7 @@ main (int argc, char *argv[])
 
   g_main_loop_run (loop);
 
+  g_source_remove (watch_id);
   gst_element_set_state (pipeline, GST_STATE_NULL);
   gst_object_unref (pipeline);
 
index d12840b..ec74cc8 100644 (file)
@@ -2112,6 +2112,10 @@ step_cb (GtkButton * button, gpointer data)
   event = gst_event_new_step (format, amount, rate, flush, FALSE);
 
   res = send_event (event);
+
+  if (!res) {
+    g_print ("Sending step event failed\n");
+  }
 }
 
 static void
@@ -2651,6 +2655,8 @@ read_joystick (GIOChannel * source, GIOCondition condition, gpointer user_data)
     g_print ("error reading joystick, read %u bytes of %u\n",
         (guint) bytes_read, (guint) sizeof (struct js_event));
     return TRUE;
+  } else if (result != G_IO_STATUS_NORMAL) {
+    g_print ("reading from joystick returned status %d", result);
   }
 
   switch (js->type & ~JS_EVENT_INIT) {
index b82a851..8bf0818 100644 (file)
@@ -2102,6 +2102,10 @@ step_cb (GtkButton * button, gpointer data)
   event = gst_event_new_step (format, amount, rate, flush, FALSE);
 
   res = send_event (event);
+
+  if (!res) {
+    g_print ("Sending step event failed\n");
+  }
 }
 
 static void