diff options
| -rw-r--r-- | include/stc/cmap.h | 12 | ||||
| -rw-r--r-- | include/stc/csmap.h | 1 |
2 files changed, 7 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);
diff --git a/include/stc/csmap.h b/include/stc/csmap.h index 8a172ad4..e6838e22 100644 --- a/include/stc/csmap.h +++ b/include/stc/csmap.h @@ -196,6 +196,7 @@ cx_memb(_begin)(const Self* self) { STC_INLINE cx_iter_t
cx_memb(_end)(const Self* self) {
+ (void)self;
return c_make(cx_iter_t){.ref = NULL};
}
|
