From 4e4f9c37fe7dfedb4408b72466666eb136d62c50 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 10 Nov 2014 18:34:25 -0600 Subject: [PATCH] Silence compiler warning in make_huffman_decode_table() --- src/decompress_common.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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; -- 2.43.0