tests: fix unused-but-set-variable warnings with gcc 4.6

https://bugzilla.gnome.org/show_bug.cgi?id=647294
This commit is contained in:
Tim-Philipp Müller 2011-04-14 00:24:26 +01:00
parent be59789664
commit 05dce4e2ac
5 changed files with 14 additions and 3 deletions

View 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)); */

View 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);

View 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);

View 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) {

View 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