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

st.c: suppress a warning

* st.c (st_hash): suppress unused label warning on 32bit
  platforms.  fix up r57134.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-12-21 11:20:02 +00:00
parent 1729243bba
commit 23ba6b2eb9

5
st.c
View file

@ -1714,6 +1714,7 @@ st_hash(const void *ptr, size_t len, st_index_t h)
#else #else
#define UNALIGNED_ADD_ALL UNALIGNED_ADD_4 #define UNALIGNED_ADD_ALL UNALIGNED_ADD_4
#endif #endif
#undef SKIP_TAIL
if (len >= sizeof(st_index_t)) { if (len >= sizeof(st_index_t)) {
#if !UNALIGNED_WORD_ACCESS #if !UNALIGNED_WORD_ACCESS
int align = (int)((st_data_t)data % sizeof(st_index_t)); int align = (int)((st_data_t)data % sizeof(st_index_t));
@ -1778,6 +1779,7 @@ st_hash(const void *ptr, size_t len, st_index_t h)
#endif #endif
if (len < (size_t)align) goto skip_tail; if (len < (size_t)align) goto skip_tail;
# define SKIP_TAIL 1
h = murmur_step(h, t); h = murmur_step(h, t);
data += pack; data += pack;
len -= pack; len -= pack;
@ -1804,6 +1806,7 @@ st_hash(const void *ptr, size_t len, st_index_t h)
case 4: case 4:
t |= (st_index_t)*(uint32_t*)data; t |= (st_index_t)*(uint32_t*)data;
goto skip_tail; goto skip_tail;
# define SKIP_TAIL 1
#endif #endif
case 3: t |= data_at(2) << 16; case 3: t |= data_at(2) << 16;
case 2: t |= data_at(1) << 8; case 2: t |= data_at(1) << 8;
@ -1819,7 +1822,7 @@ st_hash(const void *ptr, size_t len, st_index_t h)
UNALIGNED_ADD_ALL; UNALIGNED_ADD_ALL;
#undef UNALIGNED_ADD #undef UNALIGNED_ADD
#endif #endif
#if !UNALIGNED_WORD_ACCESS || (SIZEOF_ST_INDEX_T <= 8 && CHAR_BIT == 8) #ifdef SKIP_TAIL
skip_tail: skip_tail:
#endif #endif
h ^= t; h -= ROTL(t, 7); h ^= t; h -= ROTL(t, 7);