diff options
| author | Kamil Cukrowski <[email protected]> | 2021-10-01 01:44:54 +0200 |
|---|---|---|
| committer | Kamil Cukrowski <[email protected]> | 2021-10-01 01:44:54 +0200 |
| commit | aef9a85d009787a6a592c9ea81eadf655e755608 (patch) | |
| tree | e19f59cf6a53c5e808c81ac127455510e8a1a0f4 /include/stc/cmap.h | |
| parent | 17b5521efa91d4686e6fafe901505937fcde1bc7 (diff) | |
| download | STC-modified-aef9a85d009787a6a592c9ea81eadf655e755608.tar.gz STC-modified-aef9a85d009787a6a592c9ea81eadf655e755608.zip | |
cmap.h: Silence fallthrough gcc warnings
Diffstat (limited to 'include/stc/cmap.h')
| -rw-r--r-- | include/stc/cmap.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h index 5a55c3df..efd011a8 100644 --- a/include/stc/cmap.h +++ b/include/stc/cmap.h @@ -219,12 +219,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);
|
