From 71bcc1658820aa6db76236526732317d00b6ab98 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 14 Jan 2007 02:08:16 +0000 Subject: mp3: sparse: fix warnings reported with -Wshadow sendDataToOutputBuffer returns an int (and always has), and using the existing 'ret' is fine in mp3Read(). git-svn-id: https://svn.musicpd.org/mpd/trunk@5246 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/mp3_plugin.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 4e37f9a1c..224b0ed06 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -876,7 +876,6 @@ static int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc, } if (data->outputPtr >= data->outputBufferEnd) { - long ret; ret = sendDataToOutputBuffer(cb, data->inStream, dc, @@ -901,21 +900,21 @@ static int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc, data->decodedFirstFrame = 1; if (dc->seek && data->inStream->seekable) { - long i = 0; + long j = 0; data->muteFrame = MUTEFRAME_SEEK; - while (i < data->highestFrame && dc->seekWhere > - ((float)mad_timer_count(data->times[i], + while (j < data->highestFrame && dc->seekWhere > + ((float)mad_timer_count(data->times[j], MAD_UNITS_MILLISECONDS)) / 1000) { - i++; + j++; } - if (i < data->highestFrame) { + if (j < data->highestFrame) { if (seekMp3InputBuffer(data, - data->frameOffset[i]) == + data->frameOffset[j]) == 0) { data->outputPtr = data->outputBuffer; clearOutputBuffer(cb); - data->currentFrame = i; + data->currentFrame = j; } else dc->seekError = 1; data->muteFrame = 0; -- cgit v1.2.3