mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-30 21:47:18 +00:00
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.
This commit is contained in:
parent
10cc08ee32
commit
32b2e5a8b2
@ -31,8 +31,7 @@
|
|||||||
#include "bitrotate.h"
|
#include "bitrotate.h"
|
||||||
|
|
||||||
/* slower than original but handles platforms that do only aligned reads */
|
/* slower than original but handles platforms that do only aligned reads */
|
||||||
__attribute__((always_inline))
|
static inline uint32_t getblock(const uint8_t *p, int i)
|
||||||
static uint32_t getblock(const uint8_t *p, int i)
|
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
size_t size = sizeof(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
|
* Finalization mix - force all bits of a hash block to avalanche
|
||||||
*/
|
*/
|
||||||
__attribute__((always_inline))
|
static inline uint32_t fmix(uint32_t h)
|
||||||
static uint32_t fmix(uint32_t h)
|
|
||||||
{
|
{
|
||||||
h ^= h >> 16;
|
h ^= h >> 16;
|
||||||
h *= 0x85ebca6b;
|
h *= 0x85ebca6b;
|
||||||
|
Loading…
Reference in New Issue
Block a user