]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: dns: avoid a build warning when threads are disabled (dss unused)
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Feb 2021 16:38:46 +0000 (17:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Feb 2021 16:42:04 +0000 (17:42 +0100)
dns_session_release() only uses its struct dns_stream_server to access
the lock, so a warning is emitted when threads are disabled. Let's mark
it __maybe_unused.

src/dns.c

index cb30bff46fa14e30a57e0fc7f68127ace713cf4e..69364eb0b1a9ed7853849457d37f6c384c36c8fe 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -780,7 +780,7 @@ static struct appctx *dns_session_create(struct dns_session *ds);
 static void dns_session_release(struct appctx *appctx)
 {
        struct dns_session *ds = appctx->ctx.sft.ptr;
-       struct dns_stream_server *dss;
+       struct dns_stream_server *dss __maybe_unused;
 
        if (!ds)
                return;