From: Willy Tarreau Date: Sun, 7 May 2023 13:06:22 +0000 (+0200) Subject: BUILD: quic: fix build warning when threads are disabled X-Git-Tag: v2.8-dev11~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=652d1712dd8eef47fd669c1a6e1481725c644b4a;p=thirdparty%2Fhaproxy.git BUILD: quic: fix build warning when threads are disabled Commit e83f937cc ("MEDIUM: quic: use a global CID trees list") uses a local variable "tree" used only for locks, but when threads are disabled it spews a warning about this unused variable. --- diff --git a/include/haproxy/quic_conn.h b/include/haproxy/quic_conn.h index ef1ccf4738..4640e08d05 100644 --- a/include/haproxy/quic_conn.h +++ b/include/haproxy/quic_conn.h @@ -165,7 +165,7 @@ static inline void quic_cid_insert(struct quic_connection_id *conn_id) static inline void quic_cid_delete(struct quic_connection_id *conn_id) { const uchar idx = quic_cid_tree_idx(&conn_id->cid); - struct quic_cid_tree *tree = &quic_cid_trees[idx]; + struct quic_cid_tree __maybe_unused *tree = &quic_cid_trees[idx]; HA_RWLOCK_WRLOCK(QC_CID_LOCK, &tree->lock); ebmb_delete(&conn_id->node);