diff --git a/Makefile b/Makefile index c4a8529e8..9d8d350de 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,6 @@ SPEC_CFLAGS += $(call cc-nowarn,sign-compare) SPEC_CFLAGS += $(call cc-nowarn,unused-parameter) SPEC_CFLAGS += $(call cc-nowarn,clobbered) SPEC_CFLAGS += $(call cc-nowarn,missing-field-initializers) -SPEC_CFLAGS += $(call cc-nowarn,implicit-fallthrough) SPEC_CFLAGS += $(call cc-nowarn,stringop-overflow) SPEC_CFLAGS += $(call cc-nowarn,cast-function-type) SPEC_CFLAGS += $(call cc-nowarn,string-plus-int) diff --git a/src/acl.c b/src/acl.c index c32884498..5fea5dcc2 100644 --- a/src/acl.c +++ b/src/acl.c @@ -607,6 +607,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * case STD_OP_GT: value++; /* gt = ge + 1 */ + /* fall through */ case STD_OP_GE: if (expr->pat.parse == pat_parse_int) @@ -619,6 +620,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * case STD_OP_LT: value--; /* lt = le - 1 */ + /* fall through */ case STD_OP_LE: if (expr->pat.parse == pat_parse_int) diff --git a/src/check.c b/src/check.c index 18f83fa1b..82f18e3a0 100644 --- a/src/check.c +++ b/src/check.c @@ -445,7 +445,7 @@ void __health_adjust(struct server *s, short status) if (s->check.health > s->check.rise) s->check.health = s->check.rise + 1; - /* no break - fall through */ + /* fall through */ case HANA_ONERR_FAILCHK: /* simulate a failed health check */ diff --git a/src/cli.c b/src/cli.c index f850dd7e5..a8d393403 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1191,6 +1191,7 @@ static int cli_io_handler_show_cli_sock(struct appctx *appctx) return 0; } appctx->st2 = STAT_ST_LIST; + /* fall through */ case STAT_ST_LIST: if (global.stats_fe) { @@ -1267,6 +1268,7 @@ static int cli_io_handler_show_cli_sock(struct appctx *appctx) appctx->ctx.cli.p0 = &bind_conf->by_fe; /* store the latest list node dumped */ } } + /* fall through */ default: appctx->st2 = STAT_ST_FIN; return 1; diff --git a/src/hlua.c b/src/hlua.c index 6a75e88f9..18c830778 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -6255,6 +6255,7 @@ static int hlua_sample_conv_wrapper(const struct arg *arg_p, struct sample *smp, case HLUA_E_ERR: /* Display log. */ SEND_ERR(stream->be, "Lua converter '%s' returns an unknown error.\n", fcn->name); + /* fall through */ default: return 0; @@ -6388,6 +6389,7 @@ static int hlua_sample_fetch_wrapper(const struct arg *arg_p, struct sample *smp case HLUA_E_ERR: /* Display log. */ SEND_ERR(smp->px, "Lua sample-fetch '%s' returns an unknown error.\n", fcn->name); + /* fall through */ default: return 0; diff --git a/src/peers.c b/src/peers.c index 478cbd2e6..f16ba8e7e 100644 --- a/src/peers.c +++ b/src/peers.c @@ -2281,8 +2281,8 @@ switchstate: appctx->ctx.peers.ptr = curpeer; appctx->st0 = PEER_SESS_ST_SENDSUCCESS; _HA_ATOMIC_ADD(&active_peers, 1); - /* fall through */ } + /* fall through */ case PEER_SESS_ST_SENDSUCCESS: { prev_state = appctx->st0; if (!curpeer) { @@ -2328,8 +2328,8 @@ switchstate: /* switch to the waiting statuscode state */ appctx->st0 = PEER_SESS_ST_GETSTATUS; - /* fall through */ } + /* fall through */ case PEER_SESS_ST_GETSTATUS: { prev_state = appctx->st0; if (!curpeer) { @@ -2370,8 +2370,8 @@ switchstate: } _HA_ATOMIC_ADD(&connected_peers, 1); appctx->st0 = PEER_SESS_ST_WAITMSG; - /* fall through */ } + /* fall through */ case PEER_SESS_ST_WAITMSG: { uint32_t msg_len = 0; char *msg_cur = trash.area; @@ -2456,8 +2456,8 @@ send_msgs: goto out; appctx->st0 = PEER_SESS_ST_END; prev_state = appctx->st0; - /* fall through */ } + /* fall through */ case PEER_SESS_ST_END: { if (prev_state == PEER_SESS_ST_WAITMSG) _HA_ATOMIC_SUB(&connected_peers, 1); diff --git a/src/stream_interface.c b/src/stream_interface.c index ef2fc0bee..59cce13ac 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -232,6 +232,7 @@ static void stream_int_shutw(struct stream_interface *si) case SI_ST_TAR: /* Note that none of these states may happen with applets */ si->state = SI_ST_DIS; + /* fall through */ default: si->flags &= ~SI_FL_NOLINGER; si_rx_shut_blk(si); @@ -1667,6 +1668,7 @@ static void stream_int_shutw_applet(struct stream_interface *si) /* Note that none of these states may happen with applets */ si_applet_release(si); si->state = SI_ST_DIS; + /* fall through */ default: si->flags &= ~SI_FL_NOLINGER; si_rx_shut_blk(si); diff --git a/src/tcpcheck.c b/src/tcpcheck.c index 2b7c0c5de..893c2252b 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -3565,7 +3565,7 @@ static int check_proxy_tcpcheck(struct proxy *px) case TCPCHK_ACT_CONNECT: if (!chk->comment && comment) chk->comment = strdup(comment); - /* fall though */ + /* fall through */ case TCPCHK_ACT_ACTION_KW: free(comment); comment = NULL;