Fix fallthrough warnings in murmurhash
Fix two -Wimplicit-fallthrough warnings in the murmurhash function: ../src/murmurhash.c: In function 'murmurhash': ../src/murmurhash.c:71:15: warning: this statement may fall through [-Wimplicit-fallthrough=] 71 | case 3: k ^= (tail[2] << 16); | ~~^~~~~~~~~~~~~~~~~~ ../src/murmurhash.c:72:5: note: here 72 | case 2: k ^= (tail[1] << 8); | ^~~~ ../src/murmurhash.c:72:15: warning: this statement may fall through [-Wimplicit-fallthrough=] 72 | case 2: k ^= (tail[1] << 8); | ~~^~~~~~~~~~~~~~~~~ ../src/murmurhash.c:74:5: note: here 74 | case 1: | ^~~~pull/80/head
parent
5b2a062f0e
commit
df84f371fe
|
@ -69,8 +69,9 @@ murmurhash (const char *key, uint32_t len, uint32_t seed) {
|
||||||
// remainder
|
// remainder
|
||||||
switch (len & 3) { // `len % 4'
|
switch (len & 3) { // `len % 4'
|
||||||
case 3: k ^= (tail[2] << 16);
|
case 3: k ^= (tail[2] << 16);
|
||||||
|
// fallthrough
|
||||||
case 2: k ^= (tail[1] << 8);
|
case 2: k ^= (tail[1] << 8);
|
||||||
|
// fallthrough
|
||||||
case 1:
|
case 1:
|
||||||
k ^= tail[0];
|
k ^= tail[0];
|
||||||
k *= c1;
|
k *= c1;
|
||||||
|
|
Loading…
Reference in New Issue