From: Willy Tarreau Date: Fri, 24 May 2024 09:04:30 +0000 (+0200) Subject: BUILD: quic: fix unused variable warning when threads are disabled X-Git-Tag: v3.0-dev13~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51f9f6cfd49d816017ffbac884c0b5b88cc67e32;p=thirdparty%2Fhaproxy.git BUILD: quic: fix unused variable warning when threads are disabled The tree variable was introduced in 3.0 by commit dd58dff1e6 ("BUG/MEDIUM: quic: QUIC CID removed from tree without locking") which was marked for backport. The variable is only used for locks. Let's just mark the variable __maybe_unused for when the code is built without threads. The patch above was marked for backport to 2.7 so this should be backported wherever the fix was backported. --- diff --git a/src/quic_rx.c b/src/quic_rx.c index 3645f1673d..f530c443b0 100644 --- a/src/quic_rx.c +++ b/src/quic_rx.c @@ -982,7 +982,7 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt, break; case QUIC_FT_RETIRE_CONNECTION_ID: { - struct quic_cid_tree *tree; + struct quic_cid_tree *tree __maybe_unused; struct quic_connection_id *conn_id = NULL; if (!qc_handle_retire_connection_id_frm(qc, &frm, &pkt->dcid, &conn_id))