1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2012-11-09 14:02:31 +00:00
parent bbcfac95d4
commit 496d7cc886

View file

@ -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 {