]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl/crt-list: use __fallthrough in cli_io_handler_add_crtlist()
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2022 06:03:16 +0000 (07:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2022 10:14:02 +0000 (11:14 +0100)
This avoids 3 build warnings when preprocessing happens before compiling
with gcc >= 7.

src/ssl_crtlist.c

index a8cd240441c9d50f33a6e35c18b68507df4d8921..b5979bdf3172ef513c416249eb61c9fe6556dc6f 100644 (file)
@@ -1088,7 +1088,7 @@ static int cli_io_handler_add_crtlist(struct appctx *appctx)
                if (applet_putchk(appctx, &trash) == -1)
                        goto yield;
                ctx->state = ADDCRT_ST_GEN;
-               /* fallthrough */
+               __fallthrough;
        case ADDCRT_ST_GEN:
                bind_conf_node = ctx->bind_conf_node; /* get the previous ptr from the yield */
                if (bind_conf_node == NULL)
@@ -1136,7 +1136,7 @@ static int cli_io_handler_add_crtlist(struct appctx *appctx)
                        new_inst->crtlist_entry = entry;
                }
                ctx->state = ADDCRT_ST_INSERT;
-               /* fallthrough */
+               __fallthrough;
        case ADDCRT_ST_INSERT:
                /* the insertion is called for every instance of the store, not
                 * only the one we generated.
@@ -1154,7 +1154,7 @@ static int cli_io_handler_add_crtlist(struct appctx *appctx)
                entry->linenum = ++crtlist->linecount;
                ctx->entry = NULL;
                ctx->state = ADDCRT_ST_SUCCESS;
-               /* fallthrough */
+               __fallthrough;
        case ADDCRT_ST_SUCCESS:
                chunk_reset(&trash);
                chunk_appendf(&trash, "\n");