chiark / gitweb /
tree-wide: adjust fall through comments so that gcc is happy
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Jan 2017 05:50:10 +0000 (00:50 -0500)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000 (17:58 +0200)
commite6f1cc1ecaf4cefa1c8a892aab6e136b1061c6a3
tree81028e6d9fa036b50d114de359deb2aba1e0c433
parentc2f717512f40c277ef97b9ee2d2c83d9a963680a
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.)
src/basic/siphash24.c
src/basic/time-util.c