From 9c42b7cae9d4f114eee2b7f920900c6f2acf24e6 Mon Sep 17 00:00:00 2001 From: Marc Plano-Lesay Date: Tue, 19 Apr 2011 16:26:55 +0200 Subject: [PATCH] Fix unused-but-set-variable warnings with gcc 4.6 --- ext/ffmpeg/gstffmpegdec.c | 6 ++---- ext/ffmpeg/gstffmpegdemux.c | 2 -- ext/libpostproc/gstpostproc.c | 3 +-- ext/libswscale/gstffmpegscale.c | 3 --- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 99cf4db3a4..32ed3568f7 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -2301,7 +2301,7 @@ static void gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec) { if (ffmpegdec->pctx) { - gint res, size, bsize; + gint size, bsize; guint8 *data; guint8 bdata[FF_INPUT_BUFFER_PADDING_SIZE]; @@ -2310,7 +2310,7 @@ gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec) /* parse some dummy data to work around some ffmpeg weirdness where it keeps * the previous pts around */ - res = av_parser_parse (ffmpegdec->pctx, ffmpegdec->context, + av_parser_parse (ffmpegdec->pctx, ffmpegdec->context, &data, &size, bdata, bsize, -1, -1); ffmpegdec->pctx->pts = -1; ffmpegdec->pctx->dts = -1; @@ -2326,11 +2326,9 @@ static gboolean gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event) { GstFFMpegDec *ffmpegdec; - GstFFMpegDecClass *oclass; gboolean ret = FALSE; ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad); - oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event", GST_EVENT_TYPE_NAME (event)); diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c index 383ad4eb3d..353c2985be 100644 --- a/ext/ffmpeg/gstffmpegdemux.c +++ b/ext/ffmpeg/gstffmpegdemux.c @@ -668,14 +668,12 @@ static gboolean gst_ffmpegdemux_src_event (GstPad * pad, GstEvent * event) { GstFFMpegDemux *demux; - AVStream *avstream; GstFFStream *stream; gboolean res = TRUE; if (!(stream = gst_pad_get_element_private (pad))) return FALSE; - avstream = stream->avstream; demux = (GstFFMpegDemux *) gst_pad_get_parent (pad); switch (GST_EVENT_TYPE (event)) { diff --git a/ext/libpostproc/gstpostproc.c b/ext/libpostproc/gstpostproc.c index f383016864..0f89055ec4 100644 --- a/ext/libpostproc/gstpostproc.c +++ b/ext/libpostproc/gstpostproc.c @@ -599,12 +599,11 @@ gst_post_proc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstPostProc *postproc = (GstPostProc *) object; - gint quality; gchar *args; switch (prop_id) { case PROP_QUALITY: - quality = g_value_get_uint (value); + postproc->quality = g_value_get_uint (value); break; case PROP_AUTOQ: postproc->autoq = g_value_get_boolean (value); diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c index f967c207cc..697539ebbb 100644 --- a/ext/libswscale/gstffmpegscale.c +++ b/ext/libswscale/gstffmpegscale.c @@ -313,7 +313,6 @@ static GstCaps * gst_ffmpegscale_transform_caps (GstBaseTransform * trans, GstPadDirection direction, GstCaps * caps) { - GstFFMpegScale *scale; GstCaps *ret; GstStructure *structure; const GValue *par; @@ -321,8 +320,6 @@ gst_ffmpegscale_transform_caps (GstBaseTransform * trans, /* this function is always called with a simple caps */ g_return_val_if_fail (GST_CAPS_IS_SIMPLE (caps), NULL); - scale = GST_FFMPEGSCALE (trans); - structure = gst_caps_get_structure (caps, 0); ret = gst_caps_copy (caps);