From d6a4dbabd2965b58fa7ce7276f01650e54adc2f3 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Thu, 24 Aug 2017 16:16:37 +0300 Subject: [PATCH] Fixed building by GCC 7 with -Wimplicit-fallthrough. --- nxt/nxt_murmur_hash.c | 2 ++ nxt/test/lvlhsh_unit_test.c | 1 + 2 files changed, 3 insertions(+) diff --git a/nxt/nxt_murmur_hash.c b/nxt/nxt_murmur_hash.c index 325e5d7c..7b49419c 100644 --- a/nxt/nxt_murmur_hash.c +++ b/nxt/nxt_murmur_hash.c @@ -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; diff --git a/nxt/test/lvlhsh_unit_test.c b/nxt/test/lvlhsh_unit_test.c index b54cf972..dbad6d65 100644 --- a/nxt/test/lvlhsh_unit_test.c +++ b/nxt/test/lvlhsh_unit_test.c @@ -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; -- 2.47.3