ext: Remove dead assignments and resulting unused variables.

This commit is contained in:
Edward Hervey 2009-08-08 15:54:41 +02:00
parent 8cd1b5209b
commit 76044dce6d
9 changed files with 5 additions and 31 deletions

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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);

View file

@ -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);

View file

@ -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 */

View file

@ -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=%"

View file

@ -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);

View file

@ -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);

View file

@ -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: