diff options
author | Eric Wong <normalperson@yhbt.net> | 2007-01-14 02:08:16 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2007-01-14 02:08:16 +0000 |
commit | 71bcc1658820aa6db76236526732317d00b6ab98 (patch) | |
tree | 97e06c3eb221cd245a09e737cd75cf5594f0af37 /src | |
parent | 5ae84b7d0f499904b0f688aaec691ac2d50971b1 (diff) | |
download | mpd-71bcc1658820aa6db76236526732317d00b6ab98.tar.gz mpd-71bcc1658820aa6db76236526732317d00b6ab98.tar.xz mpd-71bcc1658820aa6db76236526732317d00b6ab98.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 15 |
1 files changed, 7 insertions, 8 deletions
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; |