summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2017-06-23 16:45:33 -0400
committerJoel Rosdahl <joel@rosdahl.net>2018-01-11 21:02:30 +0100
commit3c448a4566db97676b2de1f7a270d3f8daad013b (patch)
tree80e683e4f909850378d6de32ed4a1c9584360b2a
parentab7407f765371ad3188d517d035d12c986ae0347 (diff)
downloadccache-3c448a4566db97676b2de1f7a270d3f8daad013b.tar.gz
Add some fallthrough comments to work around GCC compiler warnings
-rw-r--r--murmurhashneutral2.c4
-rw-r--r--util.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/murmurhashneutral2.c b/murmurhashneutral2.c
index 53319dfb..d63e0a12 100644
--- a/murmurhashneutral2.c
+++ b/murmurhashneutral2.c
@@ -30,8 +30,8 @@ murmurhashneutral2(const void *key, int len, unsigned int seed)
switch (len)
{
- case 3: h ^= ((unsigned int) data[2]) << 16;
- case 2: h ^= ((unsigned int) data[1]) << 8;
+ case 3: h ^= ((unsigned int) data[2]) << 16; // Fallthrough.
+ case 2: h ^= ((unsigned int) data[1]) << 8; // Fallthrough.
case 1: h ^= ((unsigned int) data[0]);
h *= m;
};
diff --git a/util.c b/util.c
index f048d972..8b4783a0 100644
--- a/util.c
+++ b/util.c
@@ -969,10 +969,13 @@ parse_size_with_suffix(const char *str, uint64_t *size)
switch (*p) {
case 'T':
x *= multiplier;
+ // Fallthrough.
case 'G':
x *= multiplier;
+ // Fallthrough.
case 'M':
x *= multiplier;
+ // Fallthrough.
case 'K':
case 'k':
x *= multiplier;