From 76044dce6db9d4acfa8e6e3654e45d477ca836e1 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 8 Aug 2009 15:54:41 +0200 Subject: [PATCH] ext: Remove dead assignments and resulting unused variables. --- ext/alsa/gstalsadeviceprobe.c | 8 ++++---- ext/alsa/gstalsasink.c | 7 +------ ext/alsa/gstalsasrc.c | 4 ---- ext/gnomevfs/gstgnomevfssrc.c | 2 -- ext/ogg/gstoggaviparse.c | 1 - ext/ogg/gstoggdemux.c | 6 ------ ext/ogg/gstoggmux.c | 3 --- ext/pango/gsttextrender.c | 2 -- ext/vorbis/vorbisenc.c | 3 --- 9 files changed, 5 insertions(+), 31 deletions(-) diff --git a/ext/alsa/gstalsadeviceprobe.c b/ext/alsa/gstalsadeviceprobe.c index a4d8ecf..83596a3 100644 --- a/ext/alsa/gstalsadeviceprobe.c +++ b/ext/alsa/gstalsadeviceprobe.c @@ -52,7 +52,7 @@ static GList * gst_alsa_get_device_list (snd_pcm_stream_t stream) { snd_ctl_t *handle; - int card, err, dev; + int card, dev; snd_ctl_card_info_t *info; snd_pcm_info_t *pcminfo; gboolean mixer = (stream == -1); @@ -75,10 +75,10 @@ gst_alsa_get_device_list (snd_pcm_stream_t stream) gchar name[32]; g_snprintf (name, sizeof (name), "hw:%d", card); - if ((err = snd_ctl_open (&handle, name, 0)) < 0) { + if (snd_ctl_open (&handle, name, 0) < 0) { goto next_card; } - if ((err = snd_ctl_card_info (handle, info)) < 0) { + if (snd_ctl_card_info (handle, info) < 0) { snd_ctl_close (handle); goto next_card; } @@ -97,7 +97,7 @@ gst_alsa_get_device_list (snd_pcm_stream_t stream) snd_pcm_info_set_device (pcminfo, dev); snd_pcm_info_set_subdevice (pcminfo, 0); snd_pcm_info_set_stream (pcminfo, stream); - if ((err = snd_ctl_pcm_info (handle, pcminfo)) < 0) { + if (snd_ctl_pcm_info (handle, pcminfo) < 0) { continue; } diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c index 9172f49..1ca0f97 100644 --- a/ext/alsa/gstalsasink.c +++ b/ext/alsa/gstalsasink.c @@ -181,15 +181,11 @@ static void gst_alsasink_class_init (GstAlsaSinkClass * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; - GstBaseAudioSinkClass *gstbaseaudiosink_class; GstAudioSinkClass *gstaudiosink_class; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; gstbasesink_class = (GstBaseSinkClass *) klass; - gstbaseaudiosink_class = (GstBaseAudioSinkClass *) klass; gstaudiosink_class = (GstAudioSinkClass *) klass; parent_class = g_type_class_peek_parent (klass); @@ -882,8 +878,7 @@ gst_alsasink_write (GstAudioSink * asink, gpointer data, guint length) err = snd_pcm_wait (alsa->handle, (4 * alsa->period_time / 1000)); if (err < 0) { GST_DEBUG_OBJECT (asink, "wait error, %d", err); - } - else { + } else { err = snd_pcm_writei (alsa->handle, ptr, cptr); } diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c index 07ac78f..f97b431 100644 --- a/ext/alsa/gstalsasrc.c +++ b/ext/alsa/gstalsasrc.c @@ -201,15 +201,11 @@ static void gst_alsasrc_class_init (GstAlsaSrcClass * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; - GstBaseAudioSrcClass *gstbaseaudiosrc_class; GstAudioSrcClass *gstaudiosrc_class; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; - gstbaseaudiosrc_class = (GstBaseAudioSrcClass *) klass; gstaudiosrc_class = (GstAudioSrcClass *) klass; gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_alsasrc_finalize); diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index c7fb607..e931ee9 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -194,11 +194,9 @@ static void gst_gnome_vfs_src_class_init (GstGnomeVFSSrcClass * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; gobject_class = G_OBJECT_CLASS (klass); - gstelement_class = GST_ELEMENT_CLASS (klass); gstbasesrc_class = GST_BASE_SRC_CLASS (klass); parent_class = g_type_class_peek_parent (klass); diff --git a/ext/ogg/gstoggaviparse.c b/ext/ogg/gstoggaviparse.c index 8288830..4b51e01 100644 --- a/ext/ogg/gstoggaviparse.c +++ b/ext/ogg/gstoggaviparse.c @@ -243,7 +243,6 @@ gst_ogg_avi_parse_setcaps (GstPad * pad, GstCaps * caps) GST_DEBUG_OBJECT (ogg, "header sizes: %u %u %u", sizes[0], sizes[1], sizes[2]); - data += 12; size -= 12; /* and we need at least enough data for all the headers */ diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 21f98a5..0f30778 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -266,10 +266,8 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query) { gboolean res = TRUE; GstOggDemux *ogg; - GstOggPad *cur; ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad)); - cur = GST_OGG_PAD (pad); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_DURATION: @@ -368,10 +366,8 @@ gst_ogg_pad_event (GstPad * pad, GstEvent * event) { gboolean res; GstOggDemux *ogg; - GstOggPad *cur; ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad)); - cur = GST_OGG_PAD (pad); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: @@ -643,11 +639,9 @@ static GstFlowReturn gst_ogg_pad_internal_chain (GstPad * pad, GstBuffer * buffer) { GstOggPad *oggpad; - GstOggDemux *ogg; GstClockTime timestamp; oggpad = gst_pad_get_element_private (pad); - ogg = GST_OGG_DEMUX (oggpad->ogg); timestamp = GST_BUFFER_TIMESTAMP (buffer); GST_DEBUG_OBJECT (oggpad, "received buffer from internal pad, TS=%" diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 4624b1d..bed43b0 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -839,15 +839,12 @@ static GList * gst_ogg_mux_get_headers (GstOggPad * pad) { GList *res = NULL; - GstOggMux *ogg_mux; GstStructure *structure; GstCaps *caps; GstPad *thepad; thepad = pad->collect.pad; - ogg_mux = GST_OGG_MUX (GST_PAD_PARENT (thepad)); - GST_LOG_OBJECT (thepad, "getting headers"); caps = gst_pad_get_negotiated_caps (thepad); diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index bb3a6a1..60f5e89 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -191,11 +191,9 @@ static void gst_text_render_class_init (GstTextRenderClass * klass) { GObjectClass *gobject_class; - GstElementClass *gstelement_class; PangoFontMap *fontmap; gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; parent_class = g_type_class_peek_parent (klass); diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 0709c2e..05da728 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -600,9 +600,6 @@ static gboolean gst_vorbis_enc_sink_query (GstPad * pad, GstQuery * query) { gboolean res = TRUE; - GstVorbisEnc *vorbisenc; - - vorbisenc = GST_VORBISENC (GST_PAD_PARENT (pad)); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_CONVERT: -- 2.7.4