From ec251fe7d5bc24b5d38b0853bc5969f3a0ba06e2 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 27 Jan 2017 00:50:10 -0500 Subject: 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/nspawn/nspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nspawn/nspawn.c') diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 18d42908ff..4913907b69 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1917,7 +1917,7 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) { return 0; } - /* CLD_KILLED fallthrough */ + /* fall through */ case CLD_DUMPED: log_error("Container %s terminated by signal %s.", arg_machine, signal_to_string(status.si_status)); -- cgit v1.2.3-54-g00ecf