From: Eric Biggers Date: Tue, 11 Nov 2014 00:34:25 +0000 (-0600) Subject: Silence compiler warning in make_huffman_decode_table() X-Git-Tag: v1.7.3~1 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=4e4f9c37fe7dfedb4408b72466666eb136d62c50;ds=sidebyside Silence compiler warning in make_huffman_decode_table() --- diff --git a/src/decompress_common.c b/src/decompress_common.c index b56fc3fb..66440efe 100644 --- a/src/decompress_common.c +++ b/src/decompress_common.c @@ -292,13 +292,7 @@ make_huffman_decode_table(u16 decode_table[const restrict], v = MAKE_DIRECT_ENTRY(sorted_syms[sym_idx], codeword_len); v |= v << 16; - if (sizeof(unsigned long) == 8) { - /* This may produce a compiler warning if an - * 'unsigned long' is 32 bits, but this won't be - * executed unless an 'unsigned long' is at - * least 64 bits anyway. */ - v |= v << 32; - } + v |= v << (sizeof(unsigned long) == 8 ? 32 : 0); p = (aliased_long_t *)decode_table_ptr; n = stores_per_loop;