]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
client: Silence a gcc-7.1,0 warning.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 6 May 2017 15:40:38 +0000 (17:40 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 14 May 2017 12:21:14 +0000 (14:21 +0200)
This version of gcc complains because a case statement in
client_pre_select() may fall through. The fallthrough is intentional,
however, and this is annotated with a comment. gcc-7 scans the comments
in a switch statement and suppresses the warning if it recognizes
a comment which says that fallthrough is intended. But for this to
happen, we must spell it correctly, and without whitespace.

After this commit, gcc-7 compiles the tree with no warnings.

client_common.c

index a06aaa000b1df567914a00c65ec7cd86b00e6e46..39eb8b4cce9f6403132329fd0edfbf7b7025caaf 100644 (file)
@@ -90,7 +90,7 @@ static void client_pre_select(struct sched *s, void *context)
                        else if (ret > 0)
                                para_fd_set(ct->scc.fd, &s->wfds, &s->max_fileno);
                }
                        else if (ret > 0)
                                para_fd_set(ct->scc.fd, &s->wfds, &s->max_fileno);
                }
-               /* fall though */
+               /* fallthrough */
        case CL_EXECUTING:
                if (ct->btrn[0]) {
                        ret = btr_node_status(ct->btrn[0], 0, BTR_NT_ROOT);
        case CL_EXECUTING:
                if (ct->btrn[0]) {
                        ret = btr_node_status(ct->btrn[0], 0, BTR_NT_ROOT);