diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-12-05 04:54:14 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-12-05 04:54:14 +0100 |
commit | b8ff9357d579913a5c699d89b4126d859590eea3 (patch) | |
tree | 4df7ce5c5f6558de99e55beab7c3fe6123a6f342 | |
parent | 5560e1af0ada7eb75e8bd4945e2c05ab5d31b415 (diff) | |
download | busybox-w32-b8ff9357d579913a5c699d89b4126d859590eea3.tar.gz busybox-w32-b8ff9357d579913a5c699d89b4126d859590eea3.tar.bz2 busybox-w32-b8ff9357d579913a5c699d89b4126d859590eea3.zip |
suppress a "integer overflow in expression" waring on big endian. Closes 4405
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/bb_archive.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/bb_archive.h b/include/bb_archive.h index 9e176d335..d1a9a34ec 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h | |||
@@ -12,9 +12,10 @@ enum { | |||
12 | /* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */ | 12 | /* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */ |
13 | /* More info at: http://tukaani.org/xz/xz-file-format.txt */ | 13 | /* More info at: http://tukaani.org/xz/xz-file-format.txt */ |
14 | XZ_MAGIC1 = 256 * 0xfd + '7', | 14 | XZ_MAGIC1 = 256 * 0xfd + '7', |
15 | XZ_MAGIC2 = 256 * (256 * (256 * 'z' + 'X') + 'Z') + 0, | 15 | XZ_MAGIC2 = 256 * (unsigned)(256 * (256 * 'z' + 'X') + 'Z') + 0, |
16 | /* Different form: 32 bits, then 16 bits: */ | 16 | /* Different form: 32 bits, then 16 bits: */ |
17 | XZ_MAGIC1a = 256 * (256 * (256 * 0xfd + '7') + 'z') + 'X', | 17 | /* (unsigned) cast suppresses "integer overflow in expression" warning */ |
18 | XZ_MAGIC1a = 256 * (unsigned)(256 * (256 * 0xfd + '7') + 'z') + 'X', | ||
18 | XZ_MAGIC2a = 256 * 'Z' + 0, | 19 | XZ_MAGIC2a = 256 * 'Z' + 0, |
19 | #else | 20 | #else |
20 | COMPRESS_MAGIC = 0x9d1f, | 21 | COMPRESS_MAGIC = 0x9d1f, |