Skip to content

Commit

Permalink
Replace incorrect breaks with fallthrough comment
Browse files Browse the repository at this point in the history
Patch 0a14d0f replaced the implicit fall throughs with explicit breaks, which is clearly wrong.
Instead, we put comments that GCC will recognise, as documented:

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
  • Loading branch information
funkybob committed Sep 2, 2017
1 parent 5039a4b commit cab4a7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: precise
language: c

compiler:
Expand Down
5 changes: 2 additions & 3 deletions core/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ static uint32_t murmur2_hash(char *key, uint64_t keylen) {
switch (keylen) {
case 3:
h ^= key[2] << 16;
break;
/* fallthrough */
case 2:
h ^= key[1] << 8;
break;
/* fallthrough */
case 1:
h ^= key[0];
h *= 0x5bd1e995;
break;
}

h ^= h >> 13;
Expand Down

0 comments on commit cab4a7a

Please sign in to comment.