From 2bd2957a7a4c57dd403b2d997802adb053e26fe6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:15:35 +0000 Subject: yet more unsigned integers calculateCrossFadeChunks() still returns int, although the caller uses it as an unsigned value. Since the function body checks for negative values, it is safe to cast to unsigned. crossFade() takes signed parameters, although it callers pass unsigned integers. Change declaration to unsigned. git-svn-id: https://svn.musicpd.org/mpd/trunk@7291 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/decode.c b/src/decode.c index d8534471a..d49699dfb 100644 --- a/src/decode.c +++ b/src/decode.c @@ -76,8 +76,8 @@ static void quitDecode(PlayerControl * pc, DecoderControl * dc) wakeup_main_task(); } -static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af, - float totalTime) +static unsigned calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af, + float totalTime) { long chunks; @@ -95,7 +95,7 @@ static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af, if (chunks < 0) chunks = 0; - return (int)chunks; + return (unsigned)chunks; } static int waitOnDecode(PlayerControl * pc, DecoderControl * dc, @@ -365,7 +365,7 @@ static void advanceOutputBufferTo(OutputBuffer * cb, int to) static void crossFade(OutputBufferChunk * a, OutputBufferChunk * b, AudioFormat * format, - int fadePosition, int crossFadeChunks) + unsigned int fadePosition, unsigned int crossFadeChunks) { pcm_mix(a->data, b->data, -- cgit v1.2.3