]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: log: silence a build warning when threads are disabled
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Nov 2023 18:30:42 +0000 (19:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Nov 2023 10:21:07 +0000 (11:21 +0100)
Building without threads emits two warnings because the proxy pointer
is no longer used (only serves for the lock) since 2.9 commit 9a74a6cb1
("MAJOR: log: introduce log backends"). No backport is needed.

src/log.c

index bf1c54d37310df07d92f6cd4e16e4201f8e0907f..739add6f1a6e9ad54afc06c45ecc0c470dd8a0e4 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -809,7 +809,7 @@ static void _log_backend_srv_queue(struct server *srv)
 
 static void log_backend_srv_up(struct server *srv)
 {
-       struct proxy *p = srv->proxy;
+       struct proxy *p __maybe_unused = srv->proxy;
 
        if (!srv_lb_status_changed(srv))
                return; /* nothing to do */
@@ -863,7 +863,7 @@ static void _log_backend_srv_dequeue(struct server *srv)
 
 static void log_backend_srv_down(struct server *srv)
 {
-       struct proxy *p = srv->proxy;
+       struct proxy *p __maybe_unused = srv->proxy;
 
        if (!srv_lb_status_changed(srv))
                return; /* nothing to do */