suppress a "integer overflow in expression" waring on big endian. Closes 4405
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
5560e1af0a
commit
b8ff9357d5
@ -12,9 +12,10 @@ enum {
|
|||||||
/* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */
|
/* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */
|
||||||
/* More info at: http://tukaani.org/xz/xz-file-format.txt */
|
/* More info at: http://tukaani.org/xz/xz-file-format.txt */
|
||||||
XZ_MAGIC1 = 256 * 0xfd + '7',
|
XZ_MAGIC1 = 256 * 0xfd + '7',
|
||||||
XZ_MAGIC2 = 256 * (256 * (256 * 'z' + 'X') + 'Z') + 0,
|
XZ_MAGIC2 = 256 * (unsigned)(256 * (256 * 'z' + 'X') + 'Z') + 0,
|
||||||
/* Different form: 32 bits, then 16 bits: */
|
/* Different form: 32 bits, then 16 bits: */
|
||||||
XZ_MAGIC1a = 256 * (256 * (256 * 0xfd + '7') + 'z') + 'X',
|
/* (unsigned) cast suppresses "integer overflow in expression" warning */
|
||||||
|
XZ_MAGIC1a = 256 * (unsigned)(256 * (256 * 0xfd + '7') + 'z') + 'X',
|
||||||
XZ_MAGIC2a = 256 * 'Z' + 0,
|
XZ_MAGIC2a = 256 * 'Z' + 0,
|
||||||
#else
|
#else
|
||||||
COMPRESS_MAGIC = 0x9d1f,
|
COMPRESS_MAGIC = 0x9d1f,
|
||||||
|
Loading…
Reference in New Issue
Block a user