From: Willy Tarreau Date: Wed, 24 Feb 2021 16:38:46 +0000 (+0100) Subject: BUILD: dns: avoid a build warning when threads are disabled (dss unused) X-Git-Tag: v2.4-dev10~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3e648c92f058ef062ddd38f588603952a04efb1;p=thirdparty%2Fhaproxy.git BUILD: dns: avoid a build warning when threads are disabled (dss unused) 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. --- diff --git a/src/dns.c b/src/dns.c index cb30bff46f..69364eb0b1 100644 --- 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;