From 5d6bdf605207dcd31c830fc213f71161cd2f6f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 15 Apr 2011 00:09:14 +0100 Subject: [PATCH] Fix some unused-but-set-variable warnings with gcc 4.6 --- ext/gsm/gstgsmdec.c | 2 - ext/gsm/gstgsmenc.c | 2 - ext/musicbrainz/gsttrm.c | 2 - ext/resindvd/resindvdbin.c | 2 - ext/resindvd/rsnparsetter.c | 2 - gst/aiff/aiffparse.c | 2 - gst/colorspace/gstcolorspace.c | 7 --- gst/debugutils/gstchecksumsink.c | 68 ----------------------------- gst/debugutils/gstchopmydata.c | 40 +++-------------- gst/geometrictransform/gstfisheye.c | 2 - gst/h264parse/gsth264parse.c | 7 +-- gst/hls/m3u8.c | 4 +- gst/mpegdemux/gstmpegdemux.c | 8 ++-- gst/mpegtsdemux/mpegtsbase.c | 2 - 14 files changed, 13 insertions(+), 137 deletions(-) diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c index facea23ceb..3318bdc778 100644 --- a/ext/gsm/gstgsmdec.c +++ b/ext/gsm/gstgsmdec.c @@ -119,10 +119,8 @@ static void gst_gsmdec_class_init (GstGSMDec * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; parent_class = g_type_class_peek_parent (klass); diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c index 828334032c..434c4b1faf 100644 --- a/ext/gsm/gstgsmenc.c +++ b/ext/gsm/gstgsmenc.c @@ -113,10 +113,8 @@ static void gst_gsmenc_class_init (GstGSMEnc * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; parent_class = g_type_class_peek_parent (klass); diff --git a/ext/musicbrainz/gsttrm.c b/ext/musicbrainz/gsttrm.c index facba1cb2e..7e53cc078d 100644 --- a/ext/musicbrainz/gsttrm.c +++ b/ext/musicbrainz/gsttrm.c @@ -171,7 +171,6 @@ gst_trm_setcaps (GstPad * pad, GstCaps * caps) { GstTRM *trm; GstStructure *structure; - const gchar *mimetype; gint width; trm = GST_TRM (gst_pad_get_parent (pad)); @@ -180,7 +179,6 @@ gst_trm_setcaps (GstPad * pad, GstCaps * caps) return FALSE; structure = gst_caps_get_structure (caps, 0); - mimetype = gst_structure_get_name (structure); if (!gst_structure_get_int (structure, "depth", &trm->depth) || !gst_structure_get_int (structure, "width", &width) || diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c index e329568e1f..c2dcc5b2df 100644 --- a/ext/resindvd/resindvdbin.c +++ b/ext/resindvd/resindvdbin.c @@ -118,10 +118,8 @@ static void rsn_dvdbin_class_init (RsnDvdBinClass * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; gobject_class->finalize = rsn_dvdbin_finalize; gobject_class->set_property = rsn_dvdbin_set_property; diff --git a/ext/resindvd/rsnparsetter.c b/ext/resindvd/rsnparsetter.c index a4206aaf88..02fdd1f18a 100644 --- a/ext/resindvd/rsnparsetter.c +++ b/ext/resindvd/rsnparsetter.c @@ -73,10 +73,8 @@ static void rsn_parsetter_class_init (RsnParSetterClass * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; gobject_class->finalize = rsn_parsetter_finalize; } diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c index 2610ced409..a286dceec4 100644 --- a/gst/aiff/aiffparse.c +++ b/gst/aiff/aiffparse.c @@ -840,7 +840,6 @@ gst_aiff_parse_stream_headers (GstAiffParse * aiff) break; } case GST_MAKE_FOURCC ('S', 'S', 'N', 'D'):{ - GstFormat fmt; GstBuffer *ssndbuf = NULL; const guint8 *ssnddata = NULL; guint32 datasize; @@ -876,7 +875,6 @@ gst_aiff_parse_stream_headers (GstAiffParse * aiff) aiff->datastart = aiff->offset + aiff->ssnd_offset; /* file might be truncated */ - fmt = GST_FORMAT_BYTES; if (upstream_size) { size = MIN (datasize, (upstream_size - aiff->datastart)); } diff --git a/gst/colorspace/gstcolorspace.c b/gst/colorspace/gstcolorspace.c index 3d934a5ed3..6b512b5b2f 100644 --- a/gst/colorspace/gstcolorspace.c +++ b/gst/colorspace/gstcolorspace.c @@ -430,13 +430,6 @@ gst_csp_base_init (gpointer klass) void gst_csp_dispose (GObject * object) { - GstCsp *csp; - - g_return_if_fail (GST_IS_CSP (object)); - csp = GST_CSP (object); - - /* clean up as possible. may be called multiple times */ - G_OBJECT_CLASS (parent_class)->dispose (object); } diff --git a/gst/debugutils/gstchecksumsink.c b/gst/debugutils/gstchecksumsink.c index 7e6cb5ed40..bf9fba6f21 100644 --- a/gst/debugutils/gstchecksumsink.c +++ b/gst/debugutils/gstchecksumsink.c @@ -25,13 +25,6 @@ #include #include "gstchecksumsink.h" -/* prototypes */ - - -static void gst_checksum_sink_set_property (GObject * object, - guint property_id, const GValue * value, GParamSpec * pspec); -static void gst_checksum_sink_get_property (GObject * object, - guint property_id, GValue * value, GParamSpec * pspec); static void gst_checksum_sink_dispose (GObject * object); static void gst_checksum_sink_finalize (GObject * object); @@ -40,14 +33,6 @@ static gboolean gst_checksum_sink_stop (GstBaseSink * sink); static GstFlowReturn gst_checksum_sink_render (GstBaseSink * sink, GstBuffer * buffer); -enum -{ - PROP_0, - PROP_SYNC -}; - -/* pad templates */ - static GstStaticPadTemplate gst_checksum_sink_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -86,8 +71,6 @@ gst_checksum_sink_class_init (GstChecksumSinkClass * klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass); - gobject_class->set_property = gst_checksum_sink_set_property; - gobject_class->get_property = gst_checksum_sink_get_property; gobject_class->dispose = gst_checksum_sink_dispose; gobject_class->finalize = gst_checksum_sink_finalize; base_sink_class->start = GST_DEBUG_FUNCPTR (gst_checksum_sink_start); @@ -100,80 +83,29 @@ gst_checksum_sink_init (GstChecksumSink * checksumsink, GstChecksumSinkClass * checksumsink_class) { gst_base_sink_set_sync (GST_BASE_SINK (checksumsink), FALSE); - -} - -void -gst_checksum_sink_set_property (GObject * object, guint property_id, - const GValue * value, GParamSpec * pspec) -{ - GstChecksumSink *checksumsink; - - g_return_if_fail (GST_IS_CHECKSUM_SINK (object)); - checksumsink = GST_CHECKSUM_SINK (object); - - switch (property_id) { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -void -gst_checksum_sink_get_property (GObject * object, guint property_id, - GValue * value, GParamSpec * pspec) -{ - GstChecksumSink *checksumsink; - - g_return_if_fail (GST_IS_CHECKSUM_SINK (object)); - checksumsink = GST_CHECKSUM_SINK (object); - - switch (property_id) { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } } void gst_checksum_sink_dispose (GObject * object) { - GstChecksumSink *checksumsink; - - g_return_if_fail (GST_IS_CHECKSUM_SINK (object)); - checksumsink = GST_CHECKSUM_SINK (object); - - /* clean up as possible. may be called multiple times */ - G_OBJECT_CLASS (parent_class)->dispose (object); } void gst_checksum_sink_finalize (GObject * object) { - GstChecksumSink *checksumsink; - - g_return_if_fail (GST_IS_CHECKSUM_SINK (object)); - checksumsink = GST_CHECKSUM_SINK (object); - - /* clean up object here */ - G_OBJECT_CLASS (parent_class)->finalize (object); } - - static gboolean gst_checksum_sink_start (GstBaseSink * sink) { - return TRUE; } static gboolean gst_checksum_sink_stop (GstBaseSink * sink) { - return TRUE; } diff --git a/gst/debugutils/gstchopmydata.c b/gst/debugutils/gstchopmydata.c index 22eb2ca49c..0d50571d69 100644 --- a/gst/debugutils/gstchopmydata.c +++ b/gst/debugutils/gstchopmydata.c @@ -55,8 +55,6 @@ static void gst_chop_my_data_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); static void gst_chop_my_data_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void gst_chop_my_data_dispose (GObject * object); -static void gst_chop_my_data_finalize (GObject * object); static GstStateChangeReturn gst_chop_my_data_change_state (GstElement * element, GstStateChange transition); @@ -117,8 +115,6 @@ gst_chop_my_data_class_init (GstChopMyDataClass * klass) gobject_class->set_property = gst_chop_my_data_set_property; gobject_class->get_property = gst_chop_my_data_get_property; - gobject_class->dispose = gst_chop_my_data_dispose; - gobject_class->finalize = gst_chop_my_data_finalize; element_class->change_state = GST_DEBUG_FUNCPTR (gst_chop_my_data_change_state); @@ -215,32 +211,6 @@ gst_chop_my_data_get_property (GObject * object, guint property_id, } } -void -gst_chop_my_data_dispose (GObject * object) -{ - GstChopMyData *chopmydata; - - g_return_if_fail (GST_IS_CHOP_MY_DATA (object)); - chopmydata = GST_CHOP_MY_DATA (object); - - /* clean up as possible. may be called multiple times */ - - G_OBJECT_CLASS (parent_class)->dispose (object); -} - -void -gst_chop_my_data_finalize (GObject * object) -{ - GstChopMyData *chopmydata; - - g_return_if_fail (GST_IS_CHOP_MY_DATA (object)); - chopmydata = GST_CHOP_MY_DATA (object); - - /* clean up object here */ - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - static GstStateChangeReturn gst_chop_my_data_change_state (GstElement * element, GstStateChange transition) { @@ -358,7 +328,6 @@ gst_chop_my_data_chain (GstPad * pad, GstBuffer * buffer) static gboolean gst_chop_my_data_sink_event (GstPad * pad, GstEvent * event) { - GstFlowReturn ret = GST_FLOW_OK; gboolean res; GstChopMyData *chopmydata; @@ -368,7 +337,8 @@ gst_chop_my_data_sink_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_START: - ret = gst_chop_my_data_process (chopmydata, TRUE); + /* FIXME: I don't think it should be doing this in FLUSH_START */ + gst_chop_my_data_process (chopmydata, TRUE); res = gst_pad_push_event (chopmydata->srcpad, event); break; case GST_EVENT_FLUSH_STOP: @@ -378,7 +348,7 @@ gst_chop_my_data_sink_event (GstPad * pad, GstEvent * event) res = gst_pad_push_event (chopmydata->srcpad, event); break; case GST_EVENT_EOS: - ret = gst_chop_my_data_process (chopmydata, TRUE); + gst_chop_my_data_process (chopmydata, TRUE); res = gst_pad_push_event (chopmydata->srcpad, event); break; default: @@ -387,7 +357,7 @@ gst_chop_my_data_sink_event (GstPad * pad, GstEvent * event) } gst_object_unref (chopmydata); - return TRUE; + return res; } static gboolean @@ -410,5 +380,5 @@ gst_chop_my_data_src_event (GstPad * pad, GstEvent * event) } gst_object_unref (chopmydata); - return TRUE; + return res; } diff --git a/gst/geometrictransform/gstfisheye.c b/gst/geometrictransform/gstfisheye.c index 39be190e84..7f38858345 100644 --- a/gst/geometrictransform/gstfisheye.c +++ b/gst/geometrictransform/gstfisheye.c @@ -123,10 +123,8 @@ fisheye_map (GstGeometricTransform * gt, gint x, gint y, gdouble * in_x, static void gst_fisheye_class_init (GstFisheyeClass * klass) { - GObjectClass *gobject_class; GstGeometricTransformClass *gstgt_class; - gobject_class = (GObjectClass *) klass; gstgt_class = (GstGeometricTransformClass *) klass; parent_class = g_type_class_peek_parent (klass); diff --git a/gst/h264parse/gsth264parse.c b/gst/h264parse/gsth264parse.c index 5ad43f2fcc..a73522be37 100644 --- a/gst/h264parse/gsth264parse.c +++ b/gst/h264parse/gsth264parse.c @@ -1600,8 +1600,6 @@ gst_h264_parse_push_codec_buffer (GstH264Parse * h264parse, GstBuffer * nal, static GstFlowReturn gst_h264_parse_push_buffer (GstH264Parse * h264parse, GstBuffer * buf) { - GstFlowReturn ret = GST_FLOW_OK; - /* We can send pending events if this is the first call, since we now have * caps for the srcpad */ if (G_UNLIKELY (h264parse->pending_segment != NULL)) { @@ -1630,7 +1628,7 @@ gst_h264_parse_push_buffer (GstH264Parse * h264parse, GstBuffer * buf) GST_BUFFER_DURATION (nals->data) = 0; gst_buffer_set_caps (nals->data, h264parse->src_caps); - ret = gst_pad_push (h264parse->srcpad, nals->data); + (void) gst_pad_push (h264parse->srcpad, nals->data); nals = g_slist_delete_link (nals, nals); } h264parse->codec_nals = NULL; @@ -2445,7 +2443,7 @@ gst_h264_parse_chain_reverse (GstH264Parse * h264parse, gboolean discont, /* if we have a discont, move buffers to the decode list */ if (G_UNLIKELY (discont)) { - guint start, stop, last; + guint start, last; guint32 code; GstBuffer *prev; GstClockTime timestamp; @@ -2454,7 +2452,6 @@ gst_h264_parse_chain_reverse (GstH264Parse * h264parse, gboolean discont, "received discont, copy gathered buffers for decoding"); /* init start code accumulator */ - stop = -1; prev = h264parse->prev; h264parse->prev = NULL; diff --git a/gst/hls/m3u8.c b/gst/hls/m3u8.c index 58eb15f411..4346c2776c 100644 --- a/gst/hls/m3u8.c +++ b/gst/hls/m3u8.c @@ -179,7 +179,7 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) { gint val, duration; gchar *title, *end; - gboolean discontinuity; +// gboolean discontinuity; GstM3U8 *list; g_return_val_if_fail (self != NULL, FALSE); @@ -309,7 +309,7 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) if (int_from_string (data + 22, &data, &val)) self->mediasequence = val; } else if (g_str_has_prefix (data, "#EXT-X-DISCONTINUITY")) { - discontinuity = TRUE; + /* discontinuity = TRUE; */ } else if (g_str_has_prefix (data, "#EXT-X-PROGRAM-DATE-TIME:")) { /* */ GST_DEBUG ("FIXME parse date"); diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index d5aa6f5804..ca2bac48be 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -626,7 +626,7 @@ gst_flups_demux_handle_dvd_event (GstFluPSDemux * demux, GstEvent * event) const char *type = gst_structure_get_string (structure, "event"); gint i; gchar cur_stream_name[32]; - GstFluPSStream *temp; + GstFluPSStream *temp G_GNUC_UNUSED; if (strcmp (type, "dvd-lang-codes") == 0) { GstEvent **p_ev; @@ -639,7 +639,7 @@ gst_flups_demux_handle_dvd_event (GstFluPSDemux * demux, GstEvent * event) GST_DEBUG_OBJECT (demux, "Handling language codes event"); /* Create a video pad to ensure have it before emit no more pads */ - temp = gst_flups_demux_get_stream (demux, 0xe0, ST_VIDEO_MPEG2); + (void) gst_flups_demux_get_stream (demux, 0xe0, ST_VIDEO_MPEG2); /* Read out the languages for audio streams and request each one that * is present */ @@ -1066,7 +1066,7 @@ gst_flups_demux_handle_seek_pull (GstFluPSDemux * demux, GstEvent * event) GstSeekType start_type, stop_type; gint64 start, stop; gdouble rate; - gboolean update, flush, keyframe; + gboolean update, flush; GstSegment seeksegment; GstClockTime first_pts = MPEGTIME_TO_GSTTIME (demux->first_pts); @@ -1084,7 +1084,7 @@ gst_flups_demux_handle_seek_pull (GstFluPSDemux * demux, GstEvent * event) goto no_scr_rate; flush = flags & GST_SEEK_FLAG_FLUSH; - keyframe = flags & GST_SEEK_FLAG_KEY_UNIT; + /* keyframe = flags & GST_SEEK_FLAG_KEY_UNIT; *//* FIXME */ if (flush) { /* Flush start up and downstream to make sure data flow and loops are diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index 74e93ef5f9..17af74d3a2 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -1047,10 +1047,8 @@ mpegts_base_chain (GstPad * pad, GstBuffer * buf) MpegTSPacketizerPacketReturn pret; MpegTSPacketizer2 *packetizer; MpegTSPacketizerPacket packet; - MpegTSBaseClass *klass; base = GST_MPEGTS_BASE (gst_object_get_parent (GST_OBJECT (pad))); - klass = GST_MPEGTS_BASE_GET_CLASS (base); packetizer = base->packetizer; mpegts_packetizer_push (base->packetizer, buf);