Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:59:04 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 375c9cdab170 - stable/12 - Suppress unused variable warning in if_malo.c
Message-ID:  <202207230859.26N8x4ZD013419@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=375c9cdab170f74355c84757c8d8a9efde241785

commit 375c9cdab170f74355c84757c8d8a9efde241785
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 19:17:03 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:57:43 +0000

    Suppress unused variable warning in if_malo.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/dev/malo/if_malo.c:1573:8: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable]
                u_int ix;
                      ^
    
    Here, 'ix' is a variable that is only used when MALO_DEBUG is defined.
    Mark the variable as potentially unused, to suppress the warning.
    
    MFC after:      3 days
    
    (cherry picked from commit 218634014374de0032fcdd56656ed6b3650634d2)
---
 sys/dev/malo/if_malo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index fd672006019e..5b561bb3e54c 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -1576,7 +1576,7 @@ malo_tx_draintxq(struct malo_softc *sc, struct malo_txq *txq)
 {
 	struct ieee80211_node *ni;
 	struct malo_txbuf *bf;
-	u_int ix;
+	u_int ix __unused;
 	
 	/*
 	 * NB: this assumes output has been stopped and



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207230859.26N8x4ZD013419>