]> git.kaiwu.me - njs.git/commitdiff
Fixed building by GCC 7 with -Wimplicit-fallthrough.
authorSergey Kandaurov <pluknet@nginx.com>
Thu, 24 Aug 2017 13:16:37 +0000 (16:16 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Thu, 24 Aug 2017 13:16:37 +0000 (16:16 +0300)
nxt/nxt_murmur_hash.c
nxt/test/lvlhsh_unit_test.c

index 325e5d7c3a0e01a3058c180c953bb802a7cd1f46..7b49419c1f11f059adfc418f0f4af4a3ea281e0a 100644 (file)
@@ -40,8 +40,10 @@ nxt_murmur_hash2(const void *data, size_t len)
     switch (len) {
     case 3:
         h ^= p[2] << 16;
+        /* Fall through. */
     case 2:
         h ^= p[1] << 8;
+        /* Fall through. */
     case 1:
         h ^= p[0];
         h *= m;
index b54cf97266c83496984a5e36c0043c1b8ef1ffd1..dbad6d653f45913ba0c51be1cbe7c8db9d9d31a1 100644 (file)
@@ -74,6 +74,7 @@ lvlhsh_unit_test_add(nxt_lvlhsh_t *lh, const nxt_lvlhsh_proto_t *proto,
     case NXT_DECLINED:
         printf("lvlhsh unit test failed: key %08lX is already in hash\n",
                (long) key);
+        /* Fall through. */
 
     default:
         return NXT_ERROR;