summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 11:20:02 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 11:20:02 (GMT)
commit23ba6b2eb9258ed1354d3deeeeb610ef079f81b4 (patch)
treecf0c20420def8425b139bb65ae13a54df248c45d /st.c
parent1729243bba6e3bab8001c3f96bff0aeca47ed9ae (diff)
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
Diffstat (limited to 'st.c')
-rw-r--r--st.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/st.c b/st.c
index 1eb6775..c11078a 100644
--- a/st.c
+++ b/st.c
@@ -1714,6 +1714,7 @@ st_hash(const void *ptr, size_t len, st_index_t h)
#else
#define UNALIGNED_ADD_ALL UNALIGNED_ADD_4
#endif
+#undef SKIP_TAIL
if (len >= sizeof(st_index_t)) {
#if !UNALIGNED_WORD_ACCESS
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
if (len < (size_t)align) goto skip_tail;
+# define SKIP_TAIL 1
h = murmur_step(h, t);
data += pack;
len -= pack;
@@ -1804,6 +1806,7 @@ st_hash(const void *ptr, size_t len, st_index_t h)
case 4:
t |= (st_index_t)*(uint32_t*)data;
goto skip_tail;
+# define SKIP_TAIL 1
#endif
case 3: t |= data_at(2) << 16;
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;
#undef UNALIGNED_ADD
#endif
-#if !UNALIGNED_WORD_ACCESS || (SIZEOF_ST_INDEX_T <= 8 && CHAR_BIT == 8)
+#ifdef SKIP_TAIL
skip_tail:
#endif
h ^= t; h -= ROTL(t, 7);