summaryrefslogtreecommitdiff
path: root/src/hash.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-06-16 10:28:40 +0100
committerMaxime Coste <mawww@kakoune.org>2017-06-16 10:28:40 +0100
commitea105b99421a31f87333c83cbb580069bc988cfa (patch)
treec2668c8279b6d360e99179ddb2b402cf3f562918 /src/hash.cc
parent42d7b66b926108eeb61178e5f9e59d805e7d4617 (diff)
Add fallthrough comment to silence gcc-7 warning
Until we switch to C++17 and can use the proper attributes there. Fixes #1437
Diffstat (limited to 'src/hash.cc')
-rw-r--r--src/hash.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hash.cc b/src/hash.cc
index 2ef9262d..f5d320e2 100644
--- a/src/hash.cc
+++ b/src/hash.cc
@@ -50,8 +50,8 @@ size_t hash_data(const char* input, size_t len)
uint32_t key = 0;
switch (len & 3)
{
- case 3: key ^= tail[2] << 16;
- case 2: key ^= tail[1] << 8;
+ case 3: key ^= tail[2] << 16; /* fallthrough */
+ case 2: key ^= tail[1] << 8; /* fallthrough */
case 1: key ^= tail[0];
key *= c1;
key = rotl(key,15);