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.)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-01-31 14:04:55 -05:00
parent 9ce6d1b319
commit ec251fe7d5
8 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -999,7 +999,7 @@ static int client_receive_message(
break;
}
/* fall through for Soliciation Rapid Commit option check */
/* fall through */ /* for Soliciation Rapid Commit option check */
case DHCP6_STATE_REQUEST:
case DHCP6_STATE_RENEW:
case DHCP6_STATE_REBIND: