diff options
| author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2005-02-25 17:19:32 +0000 |
|---|---|---|
| committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2005-02-25 17:19:32 +0000 |
| commit | c3e55c01a53f005b8f6042755a83bb7059f98e7b (patch) | |
| tree | 2c3f7f99844f852a52283ce6df8614e513910c49 /apps/codecs/libwavpack/unpack.c | |
| parent | e449d88b3e6b584998f8f38ed61467c35ca74466 (diff) | |
| download | rockbox-c3e55c01a53f005b8f6042755a83bb7059f98e7b.zip rockbox-c3e55c01a53f005b8f6042755a83bb7059f98e7b.tar.gz rockbox-c3e55c01a53f005b8f6042755a83bb7059f98e7b.tar.bz2 rockbox-c3e55c01a53f005b8f6042755a83bb7059f98e7b.tar.xz | |
changes to compile without warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6057 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwavpack/unpack.c')
| -rw-r--r-- | apps/codecs/libwavpack/unpack.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/codecs/libwavpack/unpack.c b/apps/codecs/libwavpack/unpack.c index e2e27b4..917f487 100644 --- a/apps/codecs/libwavpack/unpack.c +++ b/apps/codecs/libwavpack/unpack.c @@ -17,6 +17,7 @@ #include <string.h> #include <math.h> +#include <stdlib.h> #define LOSSY_MUTE @@ -513,6 +514,7 @@ static void fixup_samples (WavpackStream *wps, long *buffer, ulong sample_count) if (flags & HYBRID_FLAG) { long min_value, max_value, min_shifted, max_shifted; + min_value = max_value = min_shifted = max_shifted = 0; switch (flags & BYTES_STORED) { case 0: @@ -531,8 +533,9 @@ static void fixup_samples (WavpackStream *wps, long *buffer, ulong sample_count) break; case 3: - min_shifted = (min_value = -(long)2147483648 >> shift) << shift; - max_shifted = (max_value = (long) 2147483647 >> shift) << shift; + // 0x80000000 is the same as 2147483648 + min_shifted = (min_value = -0x80000000 >> shift) << shift; + max_shifted = (max_value = 0x80000000 >> shift) << shift; break; } |