summaryrefslogtreecommitdiff
path: root/src/basic/siphash24.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-27 00:50:10 -0500
committerSven Eden <yamakuzure@gmx.net>2017-07-17 17:58:36 +0200
commite6f1cc1ecaf4cefa1c8a892aab6e136b1061c6a3 (patch)
tree81028e6d9fa036b50d114de359deb2aba1e0c433 /src/basic/siphash24.c
parentc2f717512f40c277ef97b9ee2d2c83d9a963680a (diff)
tree-wide: adjust fall through comments so that gcc is happy
gcc 7 adds -Wimplicit-fallthrough=3 to -Wextra. There are a few ways we could deal with that. After we take into account the need to stay compatible with older versions of the compiler (and other compilers), I don't think adding __attribute__((fallthrough)), even as a macro, is worth the trouble. It sticks out too much, a comment is just as good. But gcc has some very specific requiremnts how the comment should look. Adjust it the specific form that it likes. I don't think the extra stuff we had in those comments was adding much value. (Note: the documentation seems to be wrong, and seems to describe a different pattern from the one that is actually used. I guess either the docs or the code will have to change before gcc 7 is finalized.)
Diffstat (limited to 'src/basic/siphash24.c')
-rw-r--r--src/basic/siphash24.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/basic/siphash24.c b/src/basic/siphash24.c
index 8c1cdc3db..4bb41786c 100644
--- a/src/basic/siphash24.c
+++ b/src/basic/siphash24.c
@@ -127,18 +127,25 @@ void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
switch (left) {
case 7:
state->padding |= ((uint64_t) in[6]) << 48;
+ /* fall through */
case 6:
state->padding |= ((uint64_t) in[5]) << 40;
+ /* fall through */
case 5:
state->padding |= ((uint64_t) in[4]) << 32;
+ /* fall through */
case 4:
state->padding |= ((uint64_t) in[3]) << 24;
+ /* fall through */
case 3:
state->padding |= ((uint64_t) in[2]) << 16;
+ /* fall through */
case 2:
state->padding |= ((uint64_t) in[1]) << 8;
+ /* fall through */
case 1:
state->padding |= ((uint64_t) in[0]);
+ /* fall through */
case 0:
break;
}