aboutsummaryrefslogtreecommitdiffstats
path: root/siphash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-09 14:02:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-09 14:02:31 +0000
commit496d7cc886ddf7b466019a65506d3b9977bca8d4 (patch)
tree4e2520a0e296ef9d290a26662a0df091ba71613f /siphash.c
parentbbcfac95d467a6581b75da4c29f8a5a17804cd70 (diff)
downloadruby-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.c7
1 files changed, 5 insertions, 2 deletions
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 {