goom: fix unused-but-set-compiler warnings
authorLuis de Bethencourt <luis.debethencourt@collabora.com>
Thu, 16 Jun 2011 13:38:10 +0000 (15:38 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 17 Jun 2011 10:12:31 +0000 (11:12 +0100)
Remove unnecessary res variables, core checks existance
and type of these fields for us already via the template
caps, and we know that these fields exist because we've
fixated them before in _negotiate().

gst/goom/gstgoom.c

index 8b20231..7854449 100644 (file)
@@ -186,12 +186,11 @@ static gboolean
 gst_goom_sink_setcaps (GstGoom * goom, GstCaps * caps)
 {
   GstStructure *structure;
-  gboolean res;
 
   structure = gst_caps_get_structure (caps, 0);
 
-  res = gst_structure_get_int (structure, "channels", &goom->channels);
-  res &= gst_structure_get_int (structure, "rate", &goom->rate);
+  gst_structure_get_int (structure, "channels", &goom->channels);
+  gst_structure_get_int (structure, "rate", &goom->rate);
 
   goom->bps = goom->channels * sizeof (gint16);
 
@@ -238,7 +237,6 @@ error:
 static gboolean
 gst_goom_src_negotiate (GstGoom * goom)
 {
-  gboolean res;
   GstCaps *othercaps, *target;
   GstStructure *structure;
   GstCaps *templ;
@@ -271,7 +269,7 @@ gst_goom_src_negotiate (GstGoom * goom)
   gst_structure_fixate_field_nearest_fraction (structure, "framerate",
       DEFAULT_FPS_N, DEFAULT_FPS_D);
 
-  res = gst_goom_src_setcaps (goom, target);
+  gst_goom_src_setcaps (goom, target);
 
   /* try to get a bufferpool now */
   /* find a pool for the negotiated caps now */