From 7d38bbba79990a32060ab1c0435becac1dbe0f43 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 12 Dec 2012 06:06:39 +0000 Subject: [PATCH] Tidy up local declarations in DEFINE_BIT_COUNT. `static' is pointless (and causes `gcc -O0' to actually allocate static storage for them), and using uintmax_t rather than TYPE is overkill. --- src/microcode/bits.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/microcode/bits.h b/src/microcode/bits.h index fa0dac6d8..8cb2512ab 100644 --- a/src/microcode/bits.h +++ b/src/microcode/bits.h @@ -34,20 +34,19 @@ static inline unsigned int \ NAME (TYPE x) \ { \ /* #b01010101... */ \ - static const uintmax_t two_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 1))); \ + const TYPE two_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 1))); \ \ /* #b00110011... */ \ - static const uintmax_t four_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 2))); \ + const TYPE four_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 2))); \ \ /* #b00001111... */ \ - static const uintmax_t eight_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 4))); \ + const TYPE eight_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 4))); \ \ /* Assumption: The number of bits in a uintmax_t fits in eight bits \ (unsigned); that is, the number of bits is less than 256. */ \ \ /* This is a bit mask covering the total number of bits we need. */ \ - static const uintmax_t final_mask \ - = (((CHAR_BIT * (sizeof (TYPE))) << 1) - 1); \ + const TYPE final_mask = (((CHAR_BIT * (sizeof (TYPE))) << 1) - 1); \ \ int i; \ \ -- 2.25.1