Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:58:28 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: e21693924acb - stable/13 - Suppress unused variable warning in if_mwl.c
Message-ID:  <202207230858.26N8wS0K012860@gitrepo.freebsd.org>

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

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

commit e21693924acb47fdf8a5b50705f6e2518af47d19
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 19:45:54 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:56:46 +0000

    Suppress unused variable warning in if_mwl.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/dev/mwl/if_mwl.c:3445: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 debugging. Mark the
    variable as potentially unused, to suppress the warning.
    
    MFC after:      3 days
    
    (cherry picked from commit 52c80d495a1b9dc756452ebcbb945906ea3cf23a)
---
 sys/dev/mwl/if_mwl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index b2e6747f10c8..07af5258c450 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -3447,7 +3447,7 @@ mwl_tx_draintxq(struct mwl_softc *sc, struct mwl_txq *txq)
 {
 	struct ieee80211_node *ni;
 	struct mwl_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?202207230858.26N8wS0K012860>