From 0a8d854a29499156e99b8695208b1fde8d45c881 Mon Sep 17 00:00:00 2001 From: Alessandro Guido Date: Wed, 20 Jun 2012 10:46:19 +0200 Subject: [PATCH] Avoid compiler errors if u32 is defined as a type Fixes this error: /hash.h:304:13: error: two or more data types in declaration specifiers --- ccan/hash/hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccan/hash/hash.h b/ccan/hash/hash.h index 0400e6a3..f838e562 100644 --- a/ccan/hash/hash.h +++ b/ccan/hash/hash.h @@ -301,11 +301,11 @@ static inline uint32_t hash_pointer(const void *p, uint32_t base) if (sizeof(p) % sizeof(uint32_t) == 0) { /* This convoluted union is the right way of aliasing. */ union { - uint32_t u32[sizeof(p) / sizeof(uint32_t)]; + uint32_t a[sizeof(p) / sizeof(uint32_t)]; const void *p; } u; u.p = p; - return hash_u32(u.u32, sizeof(p) / sizeof(uint32_t), base); + return hash_u32(u.a, sizeof(p) / sizeof(uint32_t), base); } else return hash(&p, 1, base); } -- 2.39.2