From: Sergey Kandaurov Date: Thu, 24 Aug 2017 13:16:37 +0000 (+0300) Subject: Fixed building by GCC 7 with -Wimplicit-fallthrough. X-Git-Tag: 0.1.13~5 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=d6a4dbabd2965b58fa7ce7276f01650e54adc2f3;p=njs.git Fixed building by GCC 7 with -Wimplicit-fallthrough. --- 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;