]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: mux-h1: silence a harmless fallthrough warning
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Jun 2023 14:06:25 +0000 (16:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Jun 2023 14:08:13 +0000 (16:08 +0200)
This warning happened in 2.9-dev with commit 723c73f8a ("MEDIUM: mux-h1:
Split h1_process_mux() to make code more readable"). It's the usual gcc
crap that relies on comments to disable the warning but which drops these
comments between the preprocessor and the compiler, so using any split
build system (distcc, ccache etc) reintroduces the warning. Use the more
reliable and portable __fallthrough instead. No backport needed.

src/mux_h1.c

index 1bee1fa01e9876a5342897aa5be170025b2d630f..40f94cad5bd5b6f00b74716cfce4149cca989675 100644 (file)
@@ -2980,7 +2980,7 @@ static size_t h1_process_mux(struct h1c *h1c, struct buffer *buf, size_t count)
 
                        case H1_MSG_DONE:
                                TRACE_STATE("unexpected data xferred in done state", H1_EV_TX_DATA|H1_EV_H1C_ERR|H1_EV_H1S_ERR, h1c->conn, h1s);
-                               /* fall through*/
+                               __fallthrough;
 
                        default:
                                ret = 0;