From 32b2e5a8b2bfd2d84c2f78aa54fc91ddc589a5fd Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 6 Feb 2012 20:06:37 -0700 Subject: [PATCH] build: avoid gcc 4.7 warning about inlines gcc 4.7 complains: util/virhashcode.c:49:17: error: always_inline function might not be inlinable [-Werror=attributes] util/virhashcode.c:35:17: error: always_inline function might not be inlinable [-Werror=attributes] Normal 'inline' is a hint that the compiler may ignore; the fact that the function is static is good enough. We don't care if the compiler decided not to inline after all. * src/util/virhashcode.c (getblock, fmix): Relax attribute. --- src/util/virhashcode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/virhashcode.c b/src/util/virhashcode.c index 6d9179347d..d16d544139 100644 --- a/src/util/virhashcode.c +++ b/src/util/virhashcode.c @@ -31,8 +31,7 @@ #include "bitrotate.h" /* slower than original but handles platforms that do only aligned reads */ -__attribute__((always_inline)) -static uint32_t getblock(const uint8_t *p, int i) +static inline uint32_t getblock(const uint8_t *p, int i) { uint32_t r; size_t size = sizeof(r); @@ -45,8 +44,7 @@ static uint32_t getblock(const uint8_t *p, int i) /* * Finalization mix - force all bits of a hash block to avalanche */ -__attribute__((always_inline)) -static uint32_t fmix(uint32_t h) +static inline uint32_t fmix(uint32_t h) { h ^= h >> 16; h *= 0x85ebca6b;