From: Willy Tarreau Date: Mon, 14 Nov 2022 06:36:42 +0000 (+0100) Subject: BUILD: stconn: use __fallthrough in various shutw() functions X-Git-Tag: v2.7-dev9~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=476c2802c511269bb1241cea98953a344aa2f442;p=thirdparty%2Fhaproxy.git BUILD: stconn: use __fallthrough in various shutw() functions This avoids 7 build warnings when preprocessing happens before compiling with gcc >= 7. --- diff --git a/src/stconn.c b/src/stconn.c index 3ad075ffd4..a6ed548e19 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -564,14 +564,14 @@ static void sc_app_shutw(struct stconn *sc) !(ic->flags & (CF_SHUTR|CF_DONT_READ))) return; - /* fall through */ + __fallthrough; case SC_ST_CON: case SC_ST_CER: case SC_ST_QUE: case SC_ST_TAR: /* Note that none of these states may happen with applets */ sc->state = SC_ST_DIS; - /* fall through */ + __fallthrough; default: sc->flags &= ~SC_FL_NOLINGER; ic->flags |= CF_SHUTR; @@ -728,18 +728,18 @@ static void sc_app_shutw_conn(struct stconn *sc) return; } - /* fall through */ + __fallthrough; case SC_ST_CON: /* we may have to close a pending connection, and mark the * response buffer as shutr */ sc_conn_shut(sc); - /* fall through */ + __fallthrough; case SC_ST_CER: case SC_ST_QUE: case SC_ST_TAR: sc->state = SC_ST_DIS; - /* fall through */ + __fallthrough; default: sc->flags &= ~SC_FL_NOLINGER; ic->flags |= CF_SHUTR; @@ -937,7 +937,7 @@ static void sc_app_shutw_applet(struct stconn *sc) !(ic->flags & (CF_SHUTR|CF_DONT_READ))) return; - /* fall through */ + __fallthrough; case SC_ST_CON: case SC_ST_CER: case SC_ST_QUE: @@ -945,7 +945,7 @@ static void sc_app_shutw_applet(struct stconn *sc) /* Note that none of these states may happen with applets */ appctx_shut(__sc_appctx(sc)); sc->state = SC_ST_DIS; - /* fall through */ + __fallthrough; default: sc->flags &= ~SC_FL_NOLINGER; ic->flags |= CF_SHUTR;