From 6fcc86b3126f4c6cf11a98702f77529e745e3bb0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 14 Nov 2022 07:05:31 +0100 Subject: [PATCH] BUILD: ssl: use __fallthrough in cli_io_handler_commit_{cert,cafile_crlfile}() This avoids 8 build warnings when preprocessing happens before compiling with gcc >= 7. --- src/ssl_ckch.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index 9fcbbafab..40d3cf347 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -2156,7 +2156,7 @@ static int cli_io_handler_commit_cert(struct appctx *appctx) goto yield; ctx->state = CERT_ST_GEN; - /* fallthrough */ + __fallthrough; case CERT_ST_GEN: /* * This state generates the ckch instances with their @@ -2203,7 +2203,7 @@ static int cli_io_handler_commit_cert(struct appctx *appctx) y++; } ctx->state = CERT_ST_INSERT; - /* fallthrough */ + __fallthrough; case CERT_ST_INSERT: /* The generation is finished, we can insert everything */ @@ -2214,12 +2214,12 @@ static int cli_io_handler_commit_cert(struct appctx *appctx) ckch_store_replace(old_ckchs, new_ckchs); ctx->new_ckchs = ctx->old_ckchs = NULL; ctx->state = CERT_ST_SUCCESS; - /* fallthrough */ + __fallthrough; case CERT_ST_SUCCESS: if (applet_putstr(appctx, "\nSuccess!\n") == -1) goto yield; ctx->state = CERT_ST_FIN; - /* fallthrough */ + __fallthrough; case CERT_ST_FIN: /* we achieved the transaction, we can set everything to NULL */ ckchs_transaction.new_ckchs = NULL; @@ -2848,7 +2848,7 @@ static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx) goto yield; ctx->state = CACRL_ST_GEN; - /* fallthrough */ + __fallthrough; case CACRL_ST_GEN: /* * This state generates the ckch instances with their @@ -2900,7 +2900,7 @@ static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx) } ctx->state = CACRL_ST_INSERT; - /* fallthrough */ + __fallthrough; case CACRL_ST_INSERT: /* The generation is finished, we can insert everything */ @@ -2934,12 +2934,12 @@ static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx) ctx->old_entry = ctx->new_entry = NULL; ctx->state = CACRL_ST_SUCCESS; - /* fallthrough */ + __fallthrough; case CACRL_ST_SUCCESS: if (applet_putstr(appctx, "\nSuccess!\n") == -1) goto yield; ctx->state = CACRL_ST_FIN; - /* fallthrough */ + __fallthrough; case CACRL_ST_FIN: /* we achieved the transaction, we can set everything to NULL */ switch (ctx->cafile_type) {