From 496d7cc886ddf7b466019a65506d3b9977bca8d4 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Nov 2012 14:02:31 +0000 Subject: siphash.c: union sip_init_state * siphash.c (sip_init_state): use union to suppress warnings by gcc 4.7. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- siphash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'siphash.c') diff --git a/siphash.c b/siphash.c index 2e3093ed0d..c100b14ee7 100644 --- a/siphash.c +++ b/siphash.c @@ -130,8 +130,11 @@ xor64_to(uint64_t *v, const uint64_t s) #define XOR64_INT(v, x) ((v).lo ^= (x)) #endif -static const char sip_init_state_bin[] = "uespemos""modnarod""arenegyl""setybdet"; -#define sip_init_state (*(uint64_t (*)[4])sip_init_state_bin) +static const union { + char bin[32]; + uint64_t u64[4]; +} sip_init_state_bin = {"uespemos""modnarod""arenegyl""setybdet"}; +#define sip_init_state sip_init_state_bin.u64 #if SIP_HASH_STREAMING struct sip_interface_st { -- cgit v1.2.1