aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/simple/arm.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-23 21:38:56 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-12-31 22:19:18 +0200
commita45d1a5374ceb22e23255b0b595b9e641e9860af (patch)
treeac0a6e71d077fae66d9b2e7881cc05aa1130e4ed /src/liblzma/simple/arm.c
parenttuklib_integer: Silence warnings from -Wsign-conversion. (diff)
downloadxz-a45d1a5374ceb22e23255b0b595b9e641e9860af.tar.xz
liblzma: Fix warnings from -Wsign-conversion.
Also, more parentheses were added to the literal_subcoder macro in lzma_comon.h (better style but no functional change in the current usage).
Diffstat (limited to 'src/liblzma/simple/arm.c')
-rw-r--r--src/liblzma/simple/arm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblzma/simple/arm.c b/src/liblzma/simple/arm.c
index 181d0e3b..ff5073ae 100644
--- a/src/liblzma/simple/arm.c
+++ b/src/liblzma/simple/arm.c
@@ -22,9 +22,9 @@ arm_code(void *simple lzma_attribute((__unused__)),
size_t i;
for (i = 0; i + 4 <= size; i += 4) {
if (buffer[i + 3] == 0xEB) {
- uint32_t src = (buffer[i + 2] << 16)
- | (buffer[i + 1] << 8)
- | (buffer[i + 0]);
+ uint32_t src = ((uint32_t)(buffer[i + 2]) << 16)
+ | ((uint32_t)(buffer[i + 1]) << 8)
+ | (uint32_t)(buffer[i + 0]);
src <<= 2;
uint32_t dest;