]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: backend: silence a build warning when not using ssl
authorWilly Tarreau <w@1wt.eu>
Wed, 2 Apr 2025 13:25:08 +0000 (15:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Apr 2025 13:26:31 +0000 (15:26 +0200)
Since recent commit ee94a6cfc1 ("MINOR: backend: extract conn reuse
from connect_server()") a build warning "set but not used" on the
"reuse" variable is emitted, because indeed the variable is now only
checked when SSL is in use. Let's just mark it as such.

src/backend.c

index 80b651510fa4016b1bc6366fbf3909bbc85299ac..8a3399efa976d4134d26d4ce6cba03277456448c 100644 (file)
@@ -1779,7 +1779,7 @@ int connect_server(struct stream *s)
        struct connection *srv_conn = NULL;
        struct server *srv;
        int reuse_mode;
-       int reuse = 0;
+       int reuse __maybe_unused = 0;
        int init_mux = 0;
        int err;
        struct sockaddr_storage *bind_addr = NULL;