summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathis Rosenhauer <rosenhauer@dkrz.de>2015-02-04 08:52:49 (GMT)
committerMathis Rosenhauer <rosenhauer@dkrz.de>2015-02-04 08:52:49 (GMT)
commita6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a (patch)
tree8fafd9a777c9f27efc2dff8a0d9f8e534f583deb
parentd4d3a273150318ef9fa182d3dbc459aba561c6f0 (diff)
downloadlibaec-a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a.zip
libaec-a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a.tar.gz
libaec-a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a.tar.bz2
Shut up VS warning.
-rw-r--r--src/decode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decode.c b/src/decode.c
index 392a1a0..c1b5ba1 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -100,7 +100,7 @@
uint32_t mask = (data & med)?xmax:0; \
\
/*in this case: xmax - data == xmax ^ data */ \
- if (half_d <= (mask ^ data)) { \
+ if (half_d <= (mask ^ (uint32_t)data)) { \
data += (d >> 1)^(~((d & 1) - 1)); \
} else { \
data = mask ^ d; \
@@ -117,13 +117,13 @@
half_d = ((uint32_t)d >> 1) + (d & 1); \
\
if (data < 0) { \
- if (half_d <= xmax + data + 1) { \
+ if (half_d <= xmax + (uint32_t)data + 1) { \
data += ((uint32_t)d >> 1)^(~((d & 1) - 1)); \
} else { \
data = d - xmax - 1; \
} \
} else { \
- if (half_d <= xmax - data) { \
+ if (half_d <= xmax - (uint32_t)data) { \
data += ((uint32_t)d >> 1)^(~((d & 1) - 1)); \
} else { \
data = xmax - d; \