diff options
author | Mathis Rosenhauer <rosenhauer@dkrz.de> | 2015-02-04 09:52:49 +0100 |
---|---|---|
committer | Mathis Rosenhauer <rosenhauer@dkrz.de> | 2015-02-04 09:52:49 +0100 |
commit | a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a (patch) | |
tree | 8fafd9a777c9f27efc2dff8a0d9f8e534f583deb | |
parent | d4d3a273150318ef9fa182d3dbc459aba561c6f0 (diff) | |
download | libaec-a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a.tar.gz libaec-a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a.tar.bz2 libaec-a6d9b578b5e5ac95d1ad06c3a0cd4eddcff4433a.zip |
Shut up VS warning.
-rw-r--r-- | src/decode.c | 6 |
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; \ |