From a59460f68bacd684db580b5ffe1ff1de353152df Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 21 Dec 2016 11:20:02 +0000 Subject: 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 --- st.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'st.c') diff --git a/st.c b/st.c index 1eb6775d46..c11078a2b8 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); -- cgit v1.2.3