]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add some fallthrough comments to work around GCC compiler warnings
authorGeert Bosch <geert@mongodb.com>
Fri, 23 Jun 2017 20:45:33 +0000 (16:45 -0400)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 11 Jan 2018 20:02:30 +0000 (21:02 +0100)
murmurhashneutral2.c
util.c

index 53319dfb658bdf439b9e7f9a00c1c21bdeda9bd8..d63e0a12022fcd6f514685546413f53b97b561d6 100644 (file)
@@ -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 f048d972f721d3545b92dc5872b1e581036dafd5..8b4783a0d09ff7a3910b0d544dadb343de5fbb82 100644 (file)
--- 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;