]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: listener: silence a build warning about unused value without threads
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Jul 2024 13:15:49 +0000 (15:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 Jul 2024 13:17:04 +0000 (15:17 +0200)
A variable introduced in commit 1a43b9f32c ("MINOR: proto: extend
connection thread rebind API") is not used without threads and causes a
build warning. Let's just mark it maybe_unused.

Since the commit above is tagged for backporting, this one will need to
be backported along with it.

src/listener.c

index 5d07a6650af55e6abff61219f0250e1f7e6e5615..fa3b12c5c24292002b6ec12b6f6edd25c988dd40 100644 (file)
@@ -1019,7 +1019,7 @@ static inline int listener_uses_maxconn(const struct listener *l)
  */
 void listener_accept(struct listener *l)
 {
-       void (*li_set_affinity2)(struct connection *);
+       void (*li_set_affinity2)(struct connection *) __maybe_unused;
        struct connection *cli_conn;
        struct proxy *p;
        unsigned int max_accept;