summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cmap.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-10-04 19:29:16 +0200
committerGitHub <[email protected]>2021-10-04 19:29:16 +0200
commit88c67afa63e46551c67f573e0557323518c42f81 (patch)
tree4b04d5a647fda04c035b7c95bdbf9c37b0695942 /include/stc/cmap.h
parent20645dbb5ca19015d100f33277c7fcf60bd4bf93 (diff)
parent4d5726055c281e9119fe272f55cd106042c8671b (diff)
downloadSTC-modified-88c67afa63e46551c67f573e0557323518c42f81.tar.gz
STC-modified-88c67afa63e46551c67f573e0557323518c42f81.zip
Merge pull request #13 from Kamilcuk/master
Silence some warnings
Diffstat (limited to 'include/stc/cmap.h')
-rw-r--r--include/stc/cmap.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h
index 203f0e79..3a860f39 100644
--- a/include/stc/cmap.h
+++ b/include/stc/cmap.h
@@ -221,12 +221,12 @@ STC_DEF uint64_t c_default_hash(const void *key, size_t len) {
const uint8_t *p = (const uint8_t *)key, *end = p + (len & ~7ull);
for (; p != end; p += 8) { memcpy(&k, p, 8); h ^= m*k; }
switch (len & 7) {
- case 7: h ^= (uint64_t) p[6] << 48;
- case 6: h ^= (uint64_t) p[5] << 40;
- case 5: h ^= (uint64_t) p[4] << 32;
- case 4: h ^= (uint64_t) p[3] << 24;
- case 3: h ^= (uint64_t) p[2] << 16;
- case 2: h ^= (uint64_t) p[1] << 8;
+ case 7: h ^= (uint64_t) p[6] << 48; /* @fallthrough@ */
+ case 6: h ^= (uint64_t) p[5] << 40; /* @fallthrough@ */
+ case 5: h ^= (uint64_t) p[4] << 32; /* @fallthrough@ */
+ case 4: h ^= (uint64_t) p[3] << 24; /* @fallthrough@ */
+ case 3: h ^= (uint64_t) p[2] << 16; /* @fallthrough@ */
+ case 2: h ^= (uint64_t) p[1] << 8; /* @fallthrough@ */
case 1: h ^= (uint64_t) p[0]; h *= m;
}
return h ^ (h >> 15);