From fd6ac6aa8a55fae73f263dbb5bfba8dc2c5d1522 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Fri, 15 Apr 2011 15:33:35 +0200 Subject: [PATCH] videomixer: address unused but set variables GCC 4.6.x spits warnings about variables that are set but unused. Such variables have been removed in blend, collectpads2 and videomixer2. --- gst/videomixer/blend.c | 10 ++-------- gst/videomixer/gstcollectpads2.c | 3 --- gst/videomixer/videomixer2.c | 7 ------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/gst/videomixer/blend.c b/gst/videomixer/blend.c index e2d736ff43..aeeeef1578 100644 --- a/gst/videomixer/blend.c +++ b/gst/videomixer/blend.c @@ -221,8 +221,8 @@ blend_##format_name (const guint8 * src, gint xpos, gint ypos, \ gint xoffset = 0; \ gint yoffset = 0; \ gint src_comp_rowstride, dest_comp_rowstride; \ - gint src_comp_height, dest_comp_height; \ - gint src_comp_width, dest_comp_width; \ + gint src_comp_height; \ + gint src_comp_width; \ gint comp_ypos, comp_xpos; \ gint comp_yoffset, comp_xoffset; \ \ @@ -262,9 +262,7 @@ blend_##format_name (const guint8 * src, gint xpos, gint ypos, \ src_comp_rowstride = gst_video_format_get_row_stride (format_enum, 0, src_width); \ dest_comp_rowstride = gst_video_format_get_row_stride (format_enum, 0, dest_width); \ src_comp_height = gst_video_format_get_component_height (format_enum, 0, b_src_height); \ - dest_comp_height = gst_video_format_get_component_height (format_enum, 0, dest_height); \ src_comp_width = gst_video_format_get_component_width (format_enum, 0, b_src_width); \ - dest_comp_width = gst_video_format_get_component_width (format_enum, 0, dest_width); \ comp_xpos = (xpos == 0) ? 0 : gst_video_format_get_component_width (format_enum, 0, xpos); \ comp_ypos = (ypos == 0) ? 0 : gst_video_format_get_component_height (format_enum, 0, ypos); \ comp_xoffset = (xoffset == 0) ? 0 : gst_video_format_get_component_width (format_enum, 0, xoffset); \ @@ -280,9 +278,7 @@ blend_##format_name (const guint8 * src, gint xpos, gint ypos, \ src_comp_rowstride = gst_video_format_get_row_stride (format_enum, 1, src_width); \ dest_comp_rowstride = gst_video_format_get_row_stride (format_enum, 1, dest_width); \ src_comp_height = gst_video_format_get_component_height (format_enum, 1, b_src_height); \ - dest_comp_height = gst_video_format_get_component_height (format_enum, 1, dest_height); \ src_comp_width = gst_video_format_get_component_width (format_enum, 1, b_src_width); \ - dest_comp_width = gst_video_format_get_component_width (format_enum, 1, dest_width); \ comp_xpos = (xpos == 0) ? 0 : gst_video_format_get_component_width (format_enum, 1, xpos); \ comp_ypos = (ypos == 0) ? 0 : gst_video_format_get_component_height (format_enum, 1, ypos); \ comp_xoffset = (xoffset == 0) ? 0 : gst_video_format_get_component_width (format_enum, 1, xoffset); \ @@ -298,9 +294,7 @@ blend_##format_name (const guint8 * src, gint xpos, gint ypos, \ src_comp_rowstride = gst_video_format_get_row_stride (format_enum, 2, src_width); \ dest_comp_rowstride = gst_video_format_get_row_stride (format_enum, 2, dest_width); \ src_comp_height = gst_video_format_get_component_height (format_enum, 2, b_src_height); \ - dest_comp_height = gst_video_format_get_component_height (format_enum, 2, dest_height); \ src_comp_width = gst_video_format_get_component_width (format_enum, 2, b_src_width); \ - dest_comp_width = gst_video_format_get_component_width (format_enum, 2, dest_width); \ comp_xpos = (xpos == 0) ? 0 : gst_video_format_get_component_width (format_enum, 2, xpos); \ comp_ypos = (ypos == 0) ? 0 : gst_video_format_get_component_height (format_enum, 2, ypos); \ comp_xoffset = (xoffset == 0) ? 0 : gst_video_format_get_component_width (format_enum, 2, xoffset); \ diff --git a/gst/videomixer/gstcollectpads2.c b/gst/videomixer/gstcollectpads2.c index 058a064a04..8ac21d39e2 100644 --- a/gst/videomixer/gstcollectpads2.c +++ b/gst/videomixer/gstcollectpads2.c @@ -1759,7 +1759,6 @@ gst_collect_pads2_chain (GstPad * pad, GstBuffer * buffer) { GstCollectData2 *data; GstCollectPads2 *pads; - guint64 size; GstFlowReturn ret; GstBuffer **buffer_p; guint32 cookie; @@ -1782,8 +1781,6 @@ gst_collect_pads2_chain (GstPad * pad, GstBuffer * buffer) prepare_buffer_user_data = pads->prepare_buffer_user_data; GST_OBJECT_UNLOCK (pads); - size = GST_BUFFER_SIZE (buffer); - GST_COLLECT_PADS2_STREAM_LOCK (pads); /* if not started, bail out */ if (G_UNLIKELY (!pads->started)) diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index e7f6ba8574..76bbe59248 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -361,13 +361,11 @@ static GstCaps * gst_videomixer2_pad_sink_getcaps (GstPad * pad) { GstVideoMixer2 *mix; - GstVideoMixer2Pad *mixpad; GstCaps *srccaps; GstStructure *s; gint i, n; mix = GST_VIDEO_MIXER2 (gst_pad_get_parent (pad)); - mixpad = GST_VIDEO_MIXER2_PAD (pad); srccaps = gst_pad_get_fixed_caps_func (GST_PAD (mix->srcpad)); srccaps = gst_caps_make_writable (srccaps); @@ -1584,7 +1582,6 @@ gst_videomixer2_sink_prepare_buffer (GstCollectPads2 * pads, GstVideoMixer2Pad *pad = GST_VIDEO_MIXER2_PAD (data->pad); GstVideoMixer2Collect *mixcol = pad->mixcol; GstClockTime start_time, end_time; - gint64 last_stop; start_time = GST_BUFFER_TIMESTAMP (buf); if (start_time == -1) { @@ -1616,10 +1613,6 @@ gst_videomixer2_sink_prepare_buffer (GstCollectPads2 * pads, end_time *= mix->segment.abs_rate; } - last_stop = mix->segment.last_stop; - if (mix->segment.last_stop == -1) - last_stop = mix->segment.start; - if (mixcol->buffer != NULL && end_time < mixcol->end_time) { return GST_COLLECT_PADS2_FLOW_DROP; }