From: Willy Tarreau Date: Mon, 20 Nov 2023 18:30:42 +0000 (+0100) Subject: BUILD: log: silence a build warning when threads are disabled X-Git-Tag: v2.9-dev11~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f9e94ecff7a8deb20b6c6891723edf84cb1630a;p=thirdparty%2Fhaproxy.git BUILD: log: silence a build warning when threads are disabled 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. --- diff --git a/src/log.c b/src/log.c index bf1c54d373..739add6f1a 100644 --- 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 */