Remove unused variables detected by LLVM's Clang static analyzer.
authorEdward Hervey <bilboed@bilboed.com>
Fri, 3 Apr 2009 09:52:49 +0000 (11:52 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 3 Apr 2009 10:56:48 +0000 (12:56 +0200)
gst/gstbus.c
gst/gstelement.c
gst/gstelementfactory.c
gst/gstindexfactory.c
gst/gstinterface.c
gst/gstobject.c
gst/gstsystemclock.c
gst/gsttask.c
libs/gst/base/gstbasetransform.c
libs/gst/base/gstcollectpads.c
plugins/elements/gstidentity.c

index 7f4a62f..ed18570 100644 (file)
@@ -163,10 +163,8 @@ static void
 gst_bus_class_init (GstBusClass * klass)
 {
   GObjectClass *gobject_class;
-  GstObjectClass *gstobject_class;
 
   gobject_class = (GObjectClass *) klass;
-  gstobject_class = (GstObjectClass *) klass;
 
   parent_class = g_type_class_peek_parent (klass);
 
index 116da82..b830021 100644 (file)
@@ -2416,15 +2416,9 @@ gst_element_change_state (GstElement * element, GstStateChange transition)
 {
   GstElementClass *oclass;
   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstState current;
-  GstState next;
 
   oclass = GST_ELEMENT_GET_CLASS (element);
 
-  /* start with the current state. */
-  current = (GstState) GST_STATE_TRANSITION_CURRENT (transition);
-  next = GST_STATE_TRANSITION_NEXT (transition);
-
   /* call the state change function so it can set the state */
   if (oclass->change_state)
     ret = (oclass->change_state) (element, transition);
index 85f5a75..630d23b 100644 (file)
@@ -110,12 +110,8 @@ static void
 gst_element_factory_class_init (GstElementFactoryClass * klass)
 {
   GObjectClass *gobject_class;
-  GstObjectClass *gstobject_class;
-  GstPluginFeatureClass *gstpluginfeature_class;
 
   gobject_class = (GObjectClass *) klass;
-  gstobject_class = (GstObjectClass *) klass;
-  gstpluginfeature_class = (GstPluginFeatureClass *) klass;
 
   parent_class = g_type_class_peek_parent (klass);
 
index cf268a5..7dfecbe 100644 (file)
@@ -73,12 +73,8 @@ static void
 gst_index_factory_class_init (GstIndexFactoryClass * klass)
 {
   GObjectClass *gobject_class;
-  GstObjectClass *gstobject_class;
-  GstPluginFeatureClass *gstpluginfeature_class;
 
   gobject_class = (GObjectClass *) klass;
-  gstobject_class = (GstObjectClass *) klass;
-  gstpluginfeature_class = (GstPluginFeatureClass *) klass;
 
   factory_parent_class = g_type_class_peek_parent (klass);
 
index 1aedd2b..6d8390e 100644 (file)
@@ -172,15 +172,11 @@ gst_implements_interface_cast (gpointer from, GType iface_type)
 gboolean
 gst_implements_interface_check (gpointer from, GType type)
 {
-  GstImplementsInterface *iface;
-
   /* check cast, return FALSE if it fails, don't give a warning... */
   if (!G_TYPE_CHECK_INSTANCE_TYPE (from, type)) {
     return FALSE;
   }
 
-  iface = G_TYPE_CHECK_INSTANCE_CAST (from, type, GstImplementsInterface);
-
   /* now, if we're an element (or derivative), is this thing
    * actually implemented for real? */
   if (GST_IS_ELEMENT (from)) {
index ba5cdb7..e9e1e26 100644 (file)
@@ -502,13 +502,10 @@ gst_object_dispatch_properties_changed (GObject * object,
   GstObject *gst_object, *parent, *old_parent;
   guint i;
   gchar *name, *debug_name;
-  GstObjectClass *klass;
 
   /* we fail when this is not a GstObject */
   g_return_if_fail (GST_IS_OBJECT (object));
 
-  klass = GST_OBJECT_GET_CLASS (object);
-
   /* do the standard dispatching */
   G_OBJECT_CLASS (parent_class)->dispatch_properties_changed (object, n_pspecs,
       pspecs);
@@ -1175,10 +1172,6 @@ gst_signal_object_get_type (void)
 static void
 gst_signal_object_class_init (GstSignalObjectClass * klass)
 {
-  GObjectClass *gobject_class;
-
-  gobject_class = (GObjectClass *) klass;
-
   parent_class = g_type_class_peek_parent (klass);
 
 #ifndef GST_DISABLE_LOADSAVE
index 74d1452..340ca8a 100644 (file)
@@ -146,11 +146,9 @@ static void
 gst_system_clock_class_init (GstSystemClockClass * klass)
 {
   GObjectClass *gobject_class;
-  GstObjectClass *gstobject_class;
   GstClockClass *gstclock_class;
 
   gobject_class = (GObjectClass *) klass;
-  gstobject_class = (GstObjectClass *) klass;
   gstclock_class = (GstClockClass *) klass;
 
   parent_class = g_type_class_peek_parent (klass);
index 78a518b..1e739d5 100644 (file)
@@ -427,13 +427,10 @@ no_lock:
 gboolean
 gst_task_stop (GstTask * task)
 {
-  GstTaskClass *tclass;
   GstTaskState old;
 
   g_return_val_if_fail (GST_IS_TASK (task), FALSE);
 
-  tclass = GST_TASK_GET_CLASS (task);
-
   GST_DEBUG_OBJECT (task, "Stopping task %p", task);
 
   GST_OBJECT_LOCK (task);
index a3a8948..42580ae 100644 (file)
@@ -1055,14 +1055,12 @@ static gboolean
 gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
 {
   GstBaseTransform *trans;
-  GstBaseTransformClass *klass;
   GstPad *otherpad, *otherpeer;
   GstCaps *othercaps = NULL;
   gboolean ret = TRUE;
   GstCaps *incaps, *outcaps;
 
   trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
-  klass = GST_BASE_TRANSFORM_GET_CLASS (trans);
 
   otherpad = (pad == trans->srcpad) ? trans->sinkpad : trans->srcpad;
   otherpeer = gst_pad_get_peer (otherpad);
index fb65b7d..268066a 100644 (file)
@@ -1201,7 +1201,6 @@ gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer)
 {
   GstCollectData *data;
   GstCollectPads *pads;
-  guint64 size;
   GstFlowReturn ret;
   GstBuffer **buffer_p;
 
@@ -1216,7 +1215,6 @@ gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer)
   GST_OBJECT_UNLOCK (pad);
 
   pads = data->collect;
-  size = GST_BUFFER_SIZE (buffer);
 
   GST_OBJECT_LOCK (pads);
   /* if not started, bail out */
index 00d0f92..8385ea2 100644 (file)
@@ -432,11 +432,9 @@ gst_identity_check_imperfect_timestamp (GstIdentity * identity, GstBuffer * buf)
     /* check if we had a previous buffer to compare to */
     if (identity->prev_timestamp != GST_CLOCK_TIME_NONE &&
         identity->prev_duration != GST_CLOCK_TIME_NONE) {
-      guint64 offset;
       GstClockTime t_expected;
       GstClockTimeDiff dt;
 
-      offset = GST_BUFFER_OFFSET (buf);
       t_expected = identity->prev_timestamp + identity->prev_duration;
       dt = GST_CLOCK_DIFF (t_expected, timestamp);
       if (dt != 0) {