From: Ben Pfaff Date: Tue, 10 Dec 2013 05:19:00 +0000 (-0800) Subject: util: Fix sparse warning. X-Git-Tag: sliver-openvswitch-2.1.90-1~10^2~226 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4c2ed3450d413e13448bd58cfd6b03f3cc5c6b41;p=sliver-openvswitch.git util: Fix sparse warning. Without this commit, sparse warns: lib/util.c:921:15: warning: symbol 'count_1bits_8' was not declared. Should it be static? Introduced by commit c3cc4d2dd2658 (util: Better count_1bits().). Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme --- diff --git a/lib/util.h b/lib/util.h index 7c5eacbd8..8d810c2b7 100644 --- a/lib/util.h +++ b/lib/util.h @@ -371,6 +371,8 @@ log_2_ceil(uint64_t n) return log_2_floor(n) + !is_pow2(n); } +extern const uint8_t count_1bits_8[256]; + /* Returns the number of 1-bits in 'x', between 0 and 32 inclusive. */ static inline unsigned int count_1bits_32(uint32_t x) @@ -379,7 +381,6 @@ count_1bits_32(uint32_t x) /* __builtin_popcount() is fast only when supported by the CPU. */ return __builtin_popcount(x); #else - extern const uint8_t count_1bits_8[256]; /* This portable implementation is the fastest one we know of for 32 bits, * and faster than GCC __builtin_popcount(). */ return (count_1bits_8[x & 0xff] +