Remove trivial unused variables detected by CLang static analyzer.
authorEdward Hervey <bilboed@bilboed.com>
Sat, 18 Apr 2009 16:11:00 +0000 (18:11 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 18 Apr 2009 16:51:28 +0000 (18:51 +0200)
49 files changed:
ext/dv/gstdvdemux.c
ext/gdk_pixbuf/gstgdkpixbuf.c
ext/gdk_pixbuf/pixbufscale.c
ext/libcaca/gstcacasink.c
ext/libpng/gstpngdec.c
ext/raw1394/gstdv1394src.c
ext/raw1394/gsthdv1394src.c
ext/speex/gstspeexenc.c
gst/alpha/gstalpha.c
gst/alpha/gstalphacolor.c
gst/apetag/gstapedemux.c
gst/auparse/gstauparse.c
gst/effectv/gstquark.c
gst/flx/gstflxdec.c
gst/icydemux/gsticydemux.c
gst/interleave/interleave.c
gst/matroska/matroska-mux.c
gst/multifile/gstmultifilesink.c
gst/multifile/gstmultifilesrc.c
gst/qtdemux/gstrtpxqtdepay.c
gst/rtp/gstrtpac3depay.c
gst/rtp/gstrtpdvpay.c
gst/rtp/gstrtph263pay.c
gst/rtp/gstrtph263ppay.c
gst/rtp/gstrtpilbcdepay.c
gst/rtp/gstrtpjpegdepay.c
gst/rtp/gstrtpmp1sdepay.c
gst/rtp/gstrtpmp2tdepay.c
gst/rtp/gstrtpmp2tpay.c
gst/rtp/gstrtpmp4gpay.c
gst/rtp/gstrtpmp4vdepay.c
gst/rtp/gstrtpmpadepay.c
gst/rtp/gstrtpmpvdepay.c
gst/rtp/gstrtpmpvpay.c
gst/rtp/gstrtpsirenpay.c
gst/rtp/gstrtpvorbisdepay.c
gst/rtp/gstrtpvrawdepay.c
gst/rtsp/gstrtpdec.c
gst/rtsp/gstrtspsrc.c
gst/smpte/gstsmptealpha.c
gst/smpte/paint.c
gst/udp/gstdynudpsink.c
gst/udp/gstmultiudpsink.c
gst/videobox/gstvideobox.c
gst/videofilter/gstvideobalance.c
gst/videofilter/gstvideoflip.c
gst/videomixer/videomixer.c
gst/wavparse/gstwavparse.c
sys/ximage/gstximagesrc.c

index 7c7509f..99dea75 100644 (file)
@@ -1032,7 +1032,7 @@ gst_dvdemux_handle_pull_seek (GstDVDemux * demux, GstPad * pad,
 
     /* convert input format to TIME */
     conv = GST_FORMAT_TIME;
-    if (!(res = gst_dvdemux_convert_src_pair (demux, pad,
+    if (!(gst_dvdemux_convert_src_pair (demux, pad,
                 format, cur, stop, conv, &cur, &stop)))
       goto no_format;
 
@@ -1379,11 +1379,10 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
   if (G_UNLIKELY (dvdemux->need_segment)) {
     GstEvent *event;
     GstFormat format;
-    gboolean res;
 
     /* convert to time and store as start/end_timestamp */
     format = GST_FORMAT_TIME;
-    if (!(res = gst_dvdemux_convert_sink_pair (dvdemux,
+    if (!(gst_dvdemux_convert_sink_pair (dvdemux,
                 GST_FORMAT_BYTES, dvdemux->byte_segment.start,
                 dvdemux->byte_segment.stop, format,
                 &dvdemux->time_segment.start, &dvdemux->time_segment.stop)))
@@ -1395,7 +1394,7 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
 
     /* calculate current frame number */
     format = GST_FORMAT_DEFAULT;
-    if (!(res = gst_dvdemux_src_convert (dvdemux, dvdemux->videosrcpad,
+    if (!(gst_dvdemux_src_convert (dvdemux, dvdemux->videosrcpad,
                 GST_FORMAT_TIME, dvdemux->time_segment.start,
                 &format, &dvdemux->frame_offset)))
       goto segment_error;
index d35c2cb..65605ff 100644 (file)
@@ -420,10 +420,6 @@ static void
 gst_gdk_pixbuf_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
-  GstGdkPixbuf *filter;
-
-  filter = GST_GDK_PIXBUF (object);
-
   switch (prop_id) {
     case ARG_SILENT:
       /* filter->silent = g_value_get_boolean (value); */
@@ -438,10 +434,6 @@ static void
 gst_gdk_pixbuf_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
 {
-  GstGdkPixbuf *filter;
-
-  filter = GST_GDK_PIXBUF (object);
-
   switch (prop_id) {
     case ARG_SILENT:
       /* g_value_set_boolean (value, filter->silent); */
index b240528..bf0882c 100644 (file)
@@ -237,11 +237,9 @@ static GstCaps *
 gst_pixbufscale_transform_caps (GstBaseTransform * trans,
     GstPadDirection direction, GstCaps * caps)
 {
-  GstPixbufScale *pixbufscale;
   GstCaps *ret;
   int i;
 
-  pixbufscale = GST_PIXBUFSCALE (trans);
   ret = gst_caps_copy (caps);
 
   for (i = 0; i < gst_caps_get_size (ret); i++) {
@@ -303,13 +301,10 @@ static gboolean
 gst_pixbufscale_get_unit_size (GstBaseTransform * trans,
     GstCaps * caps, guint * size)
 {
-  GstPixbufScale *pixbufscale;
   gint width, height;
 
   g_assert (size);
 
-  pixbufscale = GST_PIXBUFSCALE (trans);
-
   if (!parse_caps (caps, &width, &height))
     return FALSE;
 
index c0a6f49..07bd47e 100644 (file)
@@ -261,11 +261,6 @@ gst_cacasink_setcaps (GstBaseSink * basesink, GstCaps * caps)
 static void
 gst_cacasink_init (GstCACASink * cacasink)
 {
-  GstPad *pad;
-
-  pad = GST_BASE_SINK_PAD (cacasink);
-  /* gst_pad_set_fixatecaps_function (pad, gst_cacasink_fixate); */
-
   cacasink->screen_width = GST_CACA_DEFAULT_SCREEN_WIDTH;
   cacasink->screen_height = GST_CACA_DEFAULT_SCREEN_HEIGHT;
   cacasink->bpp = GST_CACA_DEFAULT_BPP;
index 42f6c39..b7b889d 100644 (file)
@@ -856,10 +856,6 @@ setup_failed:
 static gboolean
 gst_pngdec_sink_activate_pull (GstPad * sinkpad, gboolean active)
 {
-  GstPngDec *pngdec;
-
-  pngdec = GST_PNGDEC (GST_OBJECT_PARENT (sinkpad));
-
   if (active) {
     return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_pngdec_task,
         sinkpad);
index af7b045..2716f74 100644 (file)
@@ -1036,7 +1036,6 @@ gst_dv1394src_get_query_types (GstPad * pad)
 static gboolean
 gst_dv1394src_query (GstPad * pad, GstQuery * query)
 {
-  gboolean res = TRUE;
   GstDV1394Src *src;
 
   src = GST_DV1394SRC (gst_pad_get_parent (pad));
@@ -1050,7 +1049,7 @@ gst_dv1394src_query (GstPad * pad, GstQuery * query)
       gst_query_parse_position (query, &format, NULL);
 
       /* bring our current frame to the requested format */
-      res = gst_pad_query_convert (pad,
+      gst_pad_query_convert (pad,
           GST_FORMAT_DEFAULT, src->frame_sequence, &format, &current);
 
       gst_query_set_position (query, format, current);
@@ -1062,8 +1061,7 @@ gst_dv1394src_query (GstPad * pad, GstQuery * query)
       gint64 src_val, dest_val;
 
       gst_query_parse_convert (query, &src_fmt, &src_val, &dest_fmt, &dest_val);
-      if (!(res =
-              gst_dv1394src_convert (pad, src_fmt, src_val, &dest_fmt,
+      if (!(gst_dv1394src_convert (pad, src_fmt, src_val, &dest_fmt,
                   &dest_val)))
         goto not_supported;
       gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val);
index 30f59d5..4f726f8 100644 (file)
@@ -480,7 +480,6 @@ gst_hdv1394src_discover_avc_node (GstHDV1394Src * src)
   /* loop over all our ports */
   for (; j < m && node == -1; j++) {
     raw1394handle_t handle;
-    gint n_ports;
     struct raw1394_portinfo pinf[16];
 
     /* open the port */
@@ -489,7 +488,7 @@ gst_hdv1394src_discover_avc_node (GstHDV1394Src * src)
       GST_WARNING ("raw1394 - failed to get handle: %s.\n", strerror (errno));
       continue;
     }
-    if ((n_ports = raw1394_get_port_info (handle, pinf, 16)) < 0) {
+    if (raw1394_get_port_info (handle, pinf, 16) < 0) {
       GST_WARNING ("raw1394 - failed to get port info: %s.\n",
           strerror (errno));
       goto next;
index bbd463d..fb20082 100644 (file)
@@ -527,9 +527,6 @@ static gboolean
 gst_speex_enc_sink_query (GstPad * pad, GstQuery * query)
 {
   gboolean res = TRUE;
-  GstSpeexEnc *enc;
-
-  enc = GST_SPEEX_ENC (GST_PAD_PARENT (pad));
 
   switch (GST_QUERY_TYPE (query)) {
     case GST_QUERY_CONVERT:
index 182f090..01bcbde 100644 (file)
@@ -472,11 +472,6 @@ gst_alpha_set_ayuv (guint8 * src, guint8 * dest, gint width, gint height,
 {
   gint b_alpha = (gint) (alpha * 255);
   gint y, x;
-  gint size;
-  gint stride;
-
-  stride = gst_video_format_get_row_stride (GST_VIDEO_FORMAT_AYUV, 0, width);
-  size = gst_video_format_get_size (GST_VIDEO_FORMAT_AYUV, width, height);
 
   for (y = 0; y < height; y++) {
     for (x = 0; x < width; x++) {
index aa2a03f..a588294 100644 (file)
@@ -112,13 +112,10 @@ static GstCaps *
 gst_alpha_color_transform_caps (GstBaseTransform * btrans,
     GstPadDirection direction, GstCaps * caps)
 {
-  GstAlphaColor *alpha = NULL;
   const GstCaps *tmpl_caps = NULL;
   GstCaps *result = NULL, *local_caps = NULL;
   guint i;
 
-  alpha = GST_ALPHA_COLOR (btrans);
-
   local_caps = gst_caps_copy (caps);
 
   for (i = 0; i < gst_caps_get_size (local_caps); i++) {
index fc9c3aa..8401cce 100644 (file)
@@ -169,7 +169,6 @@ static GstTagList *
 ape_demux_parse_tags (const guint8 * data, gint size)
 {
   GstTagList *taglist = gst_tag_list_new ();
-  gboolean have_tag = FALSE;
 
   GST_LOG ("Reading tags from chunk of size %u bytes", size);
 
@@ -310,7 +309,6 @@ ape_demux_parse_tags (const guint8 * data, gint size)
         gst_tag_list_add_values (taglist, GST_TAG_MERGE_APPEND,
             gst_tag, &v, NULL);
         g_value_unset (&v);
-        have_tag = TRUE;
       }
     }
     GST_DEBUG ("Read tag %s: %s", tag, val);
index 14996ae..184a731 100644 (file)
@@ -162,8 +162,6 @@ gst_au_parse_reset (GstAuParse * auparse)
 static gboolean
 gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * new_caps)
 {
-  GstPad *srcpad = NULL;
-
   if (auparse->src_caps && gst_caps_is_equal (new_caps, auparse->src_caps)) {
     GST_LOG_OBJECT (auparse, "same caps, nothing to do");
     return TRUE;
@@ -177,8 +175,7 @@ gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * new_caps)
   }
 
   if (auparse->srcpad == NULL) {
-    srcpad = auparse->srcpad =
-        gst_pad_new_from_static_template (&src_template, "src");
+    auparse->srcpad = gst_pad_new_from_static_template (&src_template, "src");
     g_return_val_if_fail (auparse->srcpad != NULL, FALSE);
 
 #if 0
@@ -500,7 +497,6 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
     gint64 srcval, GstFormat dest_format, gint64 * destval)
 {
   gboolean ret = TRUE;
-  gint64 offset;
   guint samplesize, rate;
 
   if (dest_format == src_format) {
@@ -510,7 +506,6 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
 
   GST_OBJECT_LOCK (auparse);
   samplesize = auparse->sample_size;
-  offset = auparse->offset;
   rate = auparse->samplerate;
   GST_OBJECT_UNLOCK (auparse);
 
index 602c743..088e7b5 100644 (file)
@@ -156,7 +156,7 @@ gst_quarktv_transform (GstBaseTransform * trans, GstBuffer * in,
 {
   GstQuarkTV *filter;
   gint area;
-  guint32 *src, *dest;
+  guint32 *dest;
   GstFlowReturn ret = GST_FLOW_OK;
 
   filter = GST_QUARKTV (trans);
@@ -164,7 +164,6 @@ gst_quarktv_transform (GstBaseTransform * trans, GstBuffer * in,
   gst_buffer_copy_metadata (out, in, GST_BUFFER_COPY_TIMESTAMPS);
 
   area = filter->area;
-  src = (guint32 *) GST_BUFFER_DATA (in);
   dest = (guint32 *) GST_BUFFER_DATA (out);
 
   if (G_UNLIKELY (filter->planetable == NULL))
index 8e93e98..d2bc916 100644 (file)
@@ -359,7 +359,7 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
 static void
 flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
 {
-  gulong count, packets, lines, start_line, start_l;
+  gulong count, packets, lines, start_line;
   guchar *start_p, x;
 
   g_return_if_fail (flxdec != NULL);
@@ -376,7 +376,6 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
   /* start position of delta */
   dest += (flxdec->hdr.width * start_line);
   start_p = dest;
-  start_l = lines;
 
   while (lines--) {
     /* packet count */
index 234f3f8..d857e2c 100644 (file)
@@ -234,8 +234,6 @@ gst_icydemux_dispose (GObject * object)
 static gboolean
 gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
 {
-  GstPad *srcpad = NULL;
-
   if (icydemux->src_caps == NULL ||
       !gst_caps_is_equal (new_caps, icydemux->src_caps)) {
     gst_caps_replace (&(icydemux->src_caps), new_caps);
@@ -251,7 +249,7 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
   }
 
   if (icydemux->srcpad == NULL) {
-    srcpad = icydemux->srcpad =
+    icydemux->srcpad =
         gst_pad_new_from_template (gst_element_class_get_pad_template
         (GST_ELEMENT_GET_CLASS (icydemux), "src"), "src");
     g_return_val_if_fail (icydemux->srcpad != NULL, FALSE);
index 34b88de..597504e 100644 (file)
@@ -1143,16 +1143,12 @@ forward_event_func (GstPad * pad, GValue * ret, GstEvent * event)
 static gboolean
 forward_event (GstInterleave * self, GstEvent * event)
 {
-  gboolean ret;
-
   GstIterator *it;
   GValue vret = { 0 };
 
   GST_LOG_OBJECT (self, "Forwarding event %p (%s)", event,
       GST_EVENT_TYPE_NAME (event));
 
-  ret = TRUE;
-
   g_value_init (&vret, G_TYPE_BOOLEAN);
   g_value_set_boolean (&vret, TRUE);
   it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (self));
@@ -1161,9 +1157,7 @@ forward_event (GstInterleave * self, GstEvent * event)
   gst_iterator_free (it);
   gst_event_unref (event);
 
-  ret = g_value_get_boolean (&vret);
-
-  return ret;
+  return g_value_get_boolean (&vret);
 }
 
 
index ee4b45c..ad9a9ab 100644 (file)
@@ -497,10 +497,8 @@ gst_matroska_mux_reset (GstElement * element)
 
   for (walk = mux->collect->data; walk; walk = g_slist_next (walk)) {
     GstMatroskaPad *collect_pad;
-    GstPad *thepad;
 
     collect_pad = (GstMatroskaPad *) walk->data;
-    thepad = collect_pad->collect.pad;
 
     /* reset collect pad to pristine state */
     gst_matroska_pad_reset (collect_pad, FALSE);
@@ -2246,7 +2244,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
 {
   GstEbmlWrite *ebml = mux->ebml_write;
   GstBuffer *buf, *hdr;
-  guint64 cluster, blockgroup;
+  guint64 blockgroup;
   gboolean write_duration;
   gint16 relative_timestamp;
   gint64 relative_timestamp64;
@@ -2317,7 +2315,6 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
         GST_BUFFER_TIMESTAMP (buf) / mux->time_scale);
     mux->cluster_time = GST_BUFFER_TIMESTAMP (buf);
   }
-  cluster = mux->cluster;
 
   /* update duration of this track */
   if (GST_BUFFER_DURATION_IS_VALID (buf))
index 5edb3cd..3c92cf7 100644 (file)
@@ -115,10 +115,6 @@ static void
 gst_multi_file_sink_init (GstMultiFileSink * multifilesink,
     GstMultiFileSinkClass * g_class)
 {
-  GstPad *pad;
-
-  pad = GST_BASE_SINK_PAD (multifilesink);
-
   multifilesink->filename = g_strdup (DEFAULT_LOCATION);
   multifilesink->index = DEFAULT_INDEX;
 
index f6b55ac..81945e5 100644 (file)
@@ -145,10 +145,6 @@ static void
 gst_multi_file_src_init (GstMultiFileSrc * multifilesrc,
     GstMultiFileSrcClass * g_class)
 {
-  GstPad *pad;
-
-  pad = GST_BASE_SRC_PAD (multifilesrc);
-
   multifilesrc->index = DEFAULT_INDEX;
   multifilesrc->filename = g_strdup (DEFAULT_LOCATION);
   multifilesrc->successful_read = FALSE;
index 26e294a..766cf96 100644 (file)
@@ -245,11 +245,8 @@ static gboolean
 gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstStructure *structure;
-  GstRtpXQTDepay *rtpxqtdepay;
   gint clock_rate = 90000;      /* default */
 
-  rtpxqtdepay = GST_RTP_XQT_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
 
   gst_structure_get_int (structure, "clock-rate", &clock_rate);
index 4dd3bba..6165d90 100644 (file)
@@ -102,13 +102,10 @@ static gboolean
 gst_rtp_ac3_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstStructure *structure;
-  GstRtpAC3Depay *rtpac3depay;
   gint clock_rate;
   GstCaps *srccaps;
   gboolean res;
 
-  rtpac3depay = GST_RTP_AC3_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
 
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
index f7a180e..c997bf6 100644 (file)
@@ -180,10 +180,6 @@ gst_dv_pay_get_property (GObject * object,
 static gboolean
 gst_rtp_dv_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
 {
-  GstRTPDVPay *rtpdvpay;
-
-  rtpdvpay = GST_RTP_DV_PAY (payload);
-
   /* We don't do anything here, but we could check if it's a system stream and if
    * it's not, default to sending the video only. We will negotiate downstream
    * caps when we get to see the first frame. */
index 21670f4..afad63b 100644 (file)
@@ -1823,12 +1823,10 @@ gst_rtp_h263_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
 
   GstRtpH263Pay *rtph263pay;
   GstFlowReturn ret;
-  guint size;
 
   GST_DEBUG ("-------------------- NEW FRAME ---------------");
   rtph263pay = GST_RTP_H263_PAY (payload);
 
-  size = GST_BUFFER_SIZE (buffer);
   rtph263pay->first_ts = GST_BUFFER_TIMESTAMP (buffer);
 
   /* we always encode and flush a full picture */
index a4b17ed..ef0af9d 100644 (file)
@@ -349,11 +349,9 @@ gst_rtp_h263p_pay_handle_buffer (GstBaseRTPPayload * payload,
 {
   GstRtpH263PPay *rtph263ppay;
   GstFlowReturn ret;
-  guint size;
 
   rtph263ppay = GST_RTP_H263P_PAY (payload);
 
-  size = GST_BUFFER_SIZE (buffer);
   rtph263ppay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer);
   rtph263ppay->first_duration = GST_BUFFER_DURATION (buffer);
 
index 7a57d54..3f1d716 100644 (file)
@@ -135,10 +135,6 @@ static void
 gst_rtp_ilbc_depay_init (GstRTPiLBCDepay * rtpilbcdepay,
     GstRTPiLBCDepayClass * klass)
 {
-  GstBaseRTPDepayload *depayload;
-
-  depayload = GST_BASE_RTP_DEPAYLOAD (rtpilbcdepay);
-
   /* Set default mode */
   rtpilbcdepay->mode = DEFAULT_MODE;
 }
index 75f4272..3eac3cc 100644 (file)
@@ -381,13 +381,10 @@ static gboolean
 gst_rtp_jpeg_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstStructure *structure;
-  GstRtpJPEGDepay *rtpjpegdepay;
   GstCaps *outcaps;
   gint clock_rate;
   gboolean res;
 
-  rtpjpegdepay = GST_RTP_JPEG_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
 
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
index 6ca6a9b..785fe3d 100644 (file)
@@ -115,12 +115,9 @@ gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstCaps *srccaps;
   GstStructure *structure;
-  GstRtpMP1SDepay *rtpmp1sdepay;
   gint clock_rate;
   gboolean res;
 
-  rtpmp1sdepay = GST_RTP_MP1S_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
     clock_rate = 90000;         /* default */
@@ -137,11 +134,8 @@ gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 static GstBuffer *
 gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
 {
-  GstRtpMP1SDepay *rtpmp1sdepay;
   GstBuffer *outbuf;
 
-  rtpmp1sdepay = GST_RTP_MP1S_DEPAY (depayload);
-
   outbuf = gst_rtp_buffer_get_payload_buffer (buf);
 
   GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %d",
index b4e4353..38db636 100644 (file)
@@ -140,12 +140,9 @@ gst_rtp_mp2t_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstCaps *srccaps;
   GstStructure *structure;
-  GstRtpMP2TDepay *rtpmp2tdepay;
   gint clock_rate;
   gboolean res;
 
-  rtpmp2tdepay = GST_RTP_MP2T_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
     clock_rate = 90000;         /* default */
index dbec4ed..88d554c 100644 (file)
@@ -114,13 +114,6 @@ gst_rtp_mp2t_pay_finalize (GObject * object)
 static gboolean
 gst_rtp_mp2t_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
 {
-  const char *stname;
-  GstStructure *structure;
-
-  structure = gst_caps_get_structure (caps, 0);
-
-  stname = gst_structure_get_name (structure);
-
   gst_basertppayload_set_options (payload, "video", TRUE, "MP2T-ES", 90000);
   gst_basertppayload_set_outcaps (payload, NULL);
 
@@ -164,14 +157,12 @@ gst_rtp_mp2t_pay_handle_buffer (GstBaseRTPPayload * basepayload,
 {
   GstRTPMP2TPay *rtpmp2tpay;
   guint size, avail, packet_len;
-  guint8 *data;
   GstClockTime timestamp, duration;
   GstFlowReturn ret;
 
   rtpmp2tpay = GST_RTP_MP2T_PAY (basepayload);
 
   size = GST_BUFFER_SIZE (buffer);
-  data = GST_BUFFER_DATA (buffer);
   timestamp = GST_BUFFER_TIMESTAMP (buffer);
   duration = GST_BUFFER_DURATION (buffer);
 
index 05b5b71..1ad8e1c 100644 (file)
@@ -528,9 +528,6 @@ gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * basepayload,
     GstBuffer * buffer)
 {
   GstRtpMP4GPay *rtpmp4gpay;
-  GstFlowReturn ret;
-
-  ret = GST_FLOW_OK;
 
   rtpmp4gpay = GST_RTP_MP4G_PAY (basepayload);
 
@@ -539,9 +536,7 @@ gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * basepayload,
 
   /* we always encode and flush a full AU */
   gst_adapter_push (rtpmp4gpay->adapter, buffer);
-  ret = gst_rtp_mp4g_pay_flush (rtpmp4gpay);
-
-  return ret;
+  return gst_rtp_mp4g_pay_flush (rtpmp4gpay);
 }
 
 gboolean
index c8f0dc2..bf40433 100644 (file)
@@ -133,14 +133,11 @@ static gboolean
 gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstStructure *structure;
-  GstRtpMP4VDepay *rtpmp4vdepay;
   GstCaps *srccaps;
   const gchar *str;
   gint clock_rate;
   gboolean res;
 
-  rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
 
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
index 4fc5734..3545c73 100644 (file)
@@ -105,13 +105,10 @@ static gboolean
 gst_rtp_mpa_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstStructure *structure;
-  GstRtpMPADepay *rtpmpadepay;
   GstCaps *outcaps;
   gint clock_rate;
   gboolean res;
 
-  rtpmpadepay = GST_RTP_MPA_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
 
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
index c03f405..dc8c19e 100644 (file)
@@ -108,13 +108,10 @@ static gboolean
 gst_rtp_mpv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
 {
   GstStructure *structure;
-  GstRtpMPVDepay *rtpmpvdepay;
   gint clock_rate;
   GstCaps *outcaps;
   gboolean res;
 
-  rtpmpvdepay = GST_RTP_MPV_DEPAY (depayload);
-
   structure = gst_caps_get_structure (caps, 0);
 
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
index cd26730..14a74cf 100644 (file)
@@ -114,18 +114,8 @@ gst_rtp_mpv_pay_finalize (GObject * object)
 static gboolean
 gst_rtp_mpv_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
 {
-  const char *stname;
-  GstStructure *structure;
-  gboolean res;
-
-  structure = gst_caps_get_structure (caps, 0);
-
-  stname = gst_structure_get_name (structure);
-
   gst_basertppayload_set_options (payload, "video", FALSE, "MPV", 90000);
-  res = gst_basertppayload_set_outcaps (payload, NULL);
-
-  return res;
+  return gst_basertppayload_set_outcaps (payload, NULL);
 }
 
 static GstFlowReturn
@@ -193,15 +183,12 @@ gst_rtp_mpv_pay_handle_buffer (GstBaseRTPPayload * basepayload,
     GstBuffer * buffer)
 {
   GstRTPMPVPay *rtpmpvpay;
-  guint size, avail, packet_len;
-  guint8 *data;
+  guint avail, packet_len;
   GstClockTime timestamp, duration;
   GstFlowReturn ret;
 
   rtpmpvpay = GST_RTP_MPV_PAY (basepayload);
 
-  size = GST_BUFFER_SIZE (buffer);
-  data = GST_BUFFER_DATA (buffer);
   timestamp = GST_BUFFER_TIMESTAMP (buffer);
   duration = GST_BUFFER_DURATION (buffer);
 
index e47b271..b03281b 100644 (file)
@@ -110,7 +110,6 @@ gst_rtpsirenpay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
 {
   GstRTPSirenPay *rtpsirenpay;
   GstBaseRTPAudioPayload *basertpaudiopayload;
-  gboolean ret;
   gint dct_length;
   GstStructure *structure;
   const char *payload_name;
@@ -133,9 +132,7 @@ gst_rtpsirenpay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
   /* set options for this frame based audio codec */
   gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload, 20, 40);
 
-  ret = gst_basertppayload_set_outcaps (basertppayload, NULL);
-
-  return TRUE;
+  return gst_basertppayload_set_outcaps (basertppayload, NULL);
 
   /* ERRORS */
 wrong_dct:
index 7e13859..bcaa197 100644 (file)
@@ -410,7 +410,6 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
   guint32 timestamp;
   guint32 header, ident;
   guint8 F, VDT, packets;
-  gboolean free_payload;
 
   rtpvorbisdepay = GST_RTP_VORBIS_DEPAY (depayload);
 
@@ -423,7 +422,6 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
     goto packet_short;
 
   payload = gst_rtp_buffer_get_payload (buf);
-  free_payload = FALSE;
 
   header = GST_READ_UINT32_BE (payload);
   /*
index 11ac258..4300aaa 100644 (file)
@@ -272,15 +272,12 @@ static GstBuffer *
 gst_rtp_vraw_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
 {
   GstRtpVRawDepay *rtpvrawdepay;
-  gint payload_len;
   guint8 *payload, *data, *yp, *up, *vp, *headers;
   guint32 timestamp;
   guint cont, ystride, uvstride, pgroup;
 
   rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload);
 
-  payload_len = gst_rtp_buffer_get_payload_len (buf);
-
   timestamp = gst_rtp_buffer_get_timestamp (buf);
 
   if (timestamp != rtpvrawdepay->timestamp || rtpvrawdepay->outbuf == NULL) {
index c6a942e..bacfea1 100644 (file)
@@ -442,11 +442,8 @@ gst_rtp_dec_finalize (GObject * object)
 static gboolean
 gst_rtp_dec_query_src (GstPad * pad, GstQuery * query)
 {
-  GstRTPDec *rtpdec;
   gboolean res;
 
-  rtpdec = GST_RTP_DEC (GST_PAD_PARENT (pad));
-
   switch (GST_QUERY_TYPE (query)) {
     case GST_QUERY_LATENCY:
     {
@@ -755,9 +752,6 @@ static GstStateChangeReturn
 gst_rtp_dec_change_state (GstElement * element, GstStateChange transition)
 {
   GstStateChangeReturn ret;
-  GstRTPDec *rtpdec;
-
-  rtpdec = GST_RTP_DEC (element);
 
   switch (transition) {
     default:
index eaf6ef9..185f363 100644 (file)
@@ -1376,7 +1376,6 @@ gst_rtspsrc_do_seek (GstRTSPSrc * src, GstSegment * segment)
 static gboolean
 gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
 {
-  gboolean res;
   gdouble rate;
   GstFormat format;
   GstSeekFlags flags;
@@ -1458,11 +1457,11 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
   if (playing)
     gst_rtspsrc_pause (src);
 
-  res = gst_rtspsrc_do_seek (src, &seeksegment);
+  gst_rtspsrc_do_seek (src, &seeksegment);
 
   /* and continue playing */
   if (playing)
-    res = gst_rtspsrc_play (src, &seeksegment);
+    gst_rtspsrc_play (src, &seeksegment);
 
   /* prepare for streaming again */
   if (flush) {
@@ -1899,12 +1898,10 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
 {
   const gchar *manager;
   gchar *name;
-  GstRTSPResult res;
   GstStateChangeReturn ret;
 
   /* find a manager */
-  if ((res =
-          gst_rtsp_transport_get_manager (transport->trans, &manager, 0)) < 0)
+  if (gst_rtsp_transport_get_manager (transport->trans, &manager, 0) < 0)
     goto no_manager;
 
   if (manager) {
@@ -1914,9 +1911,7 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
     if (src->session == NULL) {
       if (!(src->session = gst_element_factory_make (manager, NULL))) {
         /* fallback */
-        if ((res =
-                gst_rtsp_transport_get_manager (transport->trans, &manager,
-                    1)) < 0)
+        if (gst_rtsp_transport_get_manager (transport->trans, &manager, 1) < 0)
           goto no_manager;
 
         if (!manager)
@@ -2367,7 +2362,6 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
   gchar *name;
   GstStructure *s;
   const gchar *mime;
-  GstRTSPResult res;
 
   src = stream->parent;
 
@@ -2376,7 +2370,7 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
   s = gst_caps_get_structure (stream->caps, 0);
 
   /* get the proper mime type for this stream now */
-  if ((res = gst_rtsp_transport_get_mime (transport->trans, &mime)) < 0)
+  if (gst_rtsp_transport_get_mime (transport->trans, &mime) < 0)
     goto unknown_transport;
   if (!mime)
     goto unknown_transport;
@@ -2763,7 +2757,7 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src)
     if ((tv_timeout.tv_sec | tv_timeout.tv_usec) == 0) {
       GST_DEBUG_OBJECT (src, "timout, sending keep-alive");
       /* send keep-alive, ignore the result, a warning will be posted. */
-      res = gst_rtspsrc_send_keep_alive (src);
+      gst_rtspsrc_send_keep_alive (src);
     }
 
     GST_DEBUG_OBJECT (src, "doing receive");
@@ -3044,7 +3038,7 @@ gst_rtspsrc_loop_udp (GstRTSPSrc * src)
         case GST_RTSP_ETIMEOUT:
           /* send keep-alive, ignore the result, a warning will be posted. */
           GST_DEBUG_OBJECT (src, "timout, sending keep-alive");
-          res = gst_rtspsrc_send_keep_alive (src);
+          gst_rtspsrc_send_keep_alive (src);
           continue;
         case GST_RTSP_EEOF:
           /* server closed the connection. not very fatal for UDP, reconnect and
index d7817f4..61b4b0b 100644 (file)
@@ -346,14 +346,11 @@ static gboolean
 gst_smpte_alpha_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
     guint * size)
 {
-  GstSMPTEAlpha *smpte;
   GstStructure *structure;
   gboolean ret;
   gint width, height;
   guint32 fourcc;
 
-  smpte = GST_SMPTE_ALPHA (btrans);
-
   structure = gst_caps_get_structure (caps, 0);
 
   ret = gst_structure_get_int (structure, "width", &width);
index 25f82ea..7c2ba0d 100644 (file)
@@ -263,10 +263,9 @@ gst_smpte_paint_triangle_clock (guint32 * dest, gint stride,
 {
   gint i;
   gint sign;
-  gfloat angle, angle_s, angle_e;
+  gfloat angle, angle_e;
   gfloat len1;
 
-  angle_s = 0.0;
   angle_e = acos (((x1 - x0) * (x2 - x0) + (y1 - y0) * (y2 - y0)) /
       (sqrt ((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) *
           sqrt ((x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0))));
index abdbc71..efac30e 100644 (file)
@@ -320,7 +320,6 @@ static gboolean
 gst_dynudpsink_init_send (GstDynUDPSink * sink)
 {
   guint bc_val;
-  gint ret;
 
   if (sink->sockfd == -1) {
     /* create sender socket if none available */
@@ -328,9 +327,8 @@ gst_dynudpsink_init_send (GstDynUDPSink * sink)
       goto no_socket;
 
     bc_val = 1;
-    if ((ret =
-            setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
-                sizeof (bc_val))) < 0)
+    if (setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
+            sizeof (bc_val)) < 0)
       goto no_broadcast;
 
     sink->externalfd = TRUE;
index 9cfea95..f097333 100644 (file)
@@ -602,7 +602,6 @@ static gboolean
 gst_multiudpsink_init_send (GstMultiUDPSink * sink)
 {
   guint bc_val;
-  gint ret;
   GList *clients;
   GstUDPClient *client;
 
@@ -620,9 +619,8 @@ gst_multiudpsink_init_send (GstMultiUDPSink * sink)
   }
 
   bc_val = 1;
-  if ((ret =
-          setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
-              sizeof (bc_val))) < 0)
+  if (setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
+          sizeof (bc_val)) < 0)
     goto no_broadcast;
 
   sink->bytes_to_serve = 0;
index c515634..b9228ef 100644 (file)
@@ -949,7 +949,7 @@ gst_video_box_i420_ayuv (GstVideoBox * video_box, guint8 * src, guint8 * dest)
 {
   guint8 *srcY, *srcU, *srcV;
   gint crop_width, crop_width2, crop_height;
-  gint out_width, out_height;
+  gint out_width;
   gint src_stridey, src_strideu, src_stridev;
   gint br, bl, bt, bb;
   gint colorY, colorU, colorV;
@@ -966,7 +966,6 @@ gst_video_box_i420_ayuv (GstVideoBox * video_box, guint8 * src, guint8 * dest)
   bb = video_box->border_bottom;
 
   out_width = video_box->out_width;
-  out_height = video_box->out_height;
 
   src_stridey = GST_VIDEO_I420_Y_ROWSTRIDE (video_box->in_width);
   src_strideu = GST_VIDEO_I420_U_ROWSTRIDE (video_box->in_width);
index 2f4ba0b..7e51ad5 100644 (file)
@@ -259,7 +259,6 @@ gst_video_balance_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
   GstVideoBalance *videobalance;
   guint8 *data;
   guint size;
-  gint width, height;
 
   videobalance = GST_VIDEO_BALANCE (base);
 
@@ -270,9 +269,6 @@ gst_video_balance_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
   data = GST_BUFFER_DATA (outbuf);
   size = GST_BUFFER_SIZE (outbuf);
 
-  width = videobalance->width;
-  height = videobalance->height;
-
   if (size < videobalance->size)
     goto wrong_size;
 
@@ -401,7 +397,6 @@ static void
 gst_video_balance_init (GTypeInstance * instance, gpointer g_class)
 {
   GstVideoBalance *videobalance = GST_VIDEO_BALANCE (instance);
-  GstVideoFilter *videofilter;
   char *channels[4] = { "HUE", "SATURATION",
     "BRIGHTNESS", "CONTRAST"
   };
@@ -409,8 +404,6 @@ gst_video_balance_init (GTypeInstance * instance, gpointer g_class)
 
   GST_DEBUG ("gst_video_balance_init");
 
-  videofilter = GST_VIDEO_FILTER (videobalance);
-
   /* do stuff */
   videobalance->contrast = DEFAULT_PROP_CONTRAST;
   videobalance->brightness = DEFAULT_PROP_BRIGHTNESS;
index 051805c..d31758b 100644 (file)
@@ -564,11 +564,9 @@ gst_video_flip_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
   GstVideoFlip *videoflip;
-  GstVideoFilter *videofilter;
 
   g_return_if_fail (GST_IS_VIDEO_FLIP (object));
   videoflip = GST_VIDEO_FLIP (object);
-  videofilter = GST_VIDEO_FILTER (object);
 
   switch (prop_id) {
     case ARG_METHOD:
index 6a2e521..354b567 100644 (file)
@@ -1474,15 +1474,12 @@ forward_event_func (GstPad * pad, GValue * ret, GstEvent * event)
 static gboolean
 forward_event (GstVideoMixer * mix, GstEvent * event)
 {
-  gboolean ret;
   GstIterator *it;
   GValue vret = { 0 };
 
   GST_LOG_OBJECT (mix, "Forwarding event %p (%s)", event,
       GST_EVENT_TYPE_NAME (event));
 
-  ret = TRUE;
-
   g_value_init (&vret, G_TYPE_BOOLEAN);
   g_value_set_boolean (&vret, TRUE);
   it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mix));
@@ -1491,9 +1488,7 @@ forward_event (GstVideoMixer * mix, GstEvent * event)
   gst_iterator_free (it);
   gst_event_unref (event);
 
-  ret = g_value_get_boolean (&vret);
-
-  return ret;
+  return g_value_get_boolean (&vret);
 }
 
 static gboolean
index 5daee4d..254457d 100644 (file)
@@ -1314,8 +1314,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
      */
     switch (tag) {
       case GST_RIFF_TAG_data:{
-        GstFormat fmt;
-
         GST_DEBUG_OBJECT (wav, "Got 'data' TAG, size : %d", size);
         if (wav->streaming) {
           gst_adapter_flush (wav->adapter, 8);
@@ -1326,7 +1324,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
         wav->offset += 8;
         wav->datastart = wav->offset;
         /* file might be truncated */
-        fmt = GST_FORMAT_BYTES;
         if (upstream_size) {
           size = MIN (size, (upstream_size - wav->datastart));
         }
index 1528812..77893f4 100644 (file)
@@ -933,7 +933,7 @@ gst_ximage_src_get_caps (GstBaseSrc * bs)
 {
   GstXImageSrc *s = GST_XIMAGE_SRC (bs);
   GstXContext *xcontext;
-  gint x, y, width, height;
+  gint width, height;
 
   if ((!s->xcontext) && (!gst_ximage_src_open_display (s, s->display_name)))
     return
@@ -947,7 +947,6 @@ gst_ximage_src_get_caps (GstBaseSrc * bs)
 
   xcontext = s->xcontext;
 
-  x = y = 0;
   width = xcontext->width;
   height = xcontext->height;
   if (s->endx > s->startx && s->endy > s->starty) {
@@ -955,8 +954,6 @@ gst_ximage_src_get_caps (GstBaseSrc * bs)
     if (s->startx < xcontext->width && s->endx < xcontext->width &&
         s->starty < xcontext->height && s->endy < xcontext->height) {
       /* values are fine */
-      x = s->startx;
-      y = s->starty;
       s->width = width = s->endx - s->startx;
       s->height = height = s->endy - s->starty;
     } else {