diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 14:02:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 14:02:31 +0000 |
commit | 496d7cc886ddf7b466019a65506d3b9977bca8d4 (patch) | |
tree | 4e2520a0e296ef9d290a26662a0df091ba71613f /siphash.c | |
parent | bbcfac95d467a6581b75da4c29f8a5a17804cd70 (diff) | |
download | ruby-496d7cc886ddf7b466019a65506d3b9977bca8d4.tar.gz |
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
Diffstat (limited to 'siphash.c')
-rw-r--r-- | siphash.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 { |