Date: Sun, 24 Jul 2022 11:01:52 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: 6cc991e810f3 - stable/13 - Fix unused variable warning in if_lagg.c Message-ID: <202207241101.26OB1qCj040871@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=6cc991e810f3bc97446051af1242e49c336f3fb2 commit 6cc991e810f3bc97446051af1242e49c336f3fb2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-21 18:51:23 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-24 11:00:09 +0000 Fix unused variable warning in if_lagg.c With clang 15, the following -Werror warning is produced: sys/net/if_lagg.c:2413:6: error: variable 'active_ports' set but not used [-Werror,-Wunused-but-set-variable] int active_ports = 0; ^ The 'active_ports' variable appears to have been a debugging aid that has never been used for anything (ref https://reviews.freebsd.org/D549), so remove it. MFC after: 3 days (cherry picked from commit fa267a329ffa3d0e02c3c3a52dd5df5231d92cba) --- sys/net/if_lagg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 55aae2795644..eeae7273ad2a 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -2337,7 +2337,6 @@ lagg_rr_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m) static int lagg_bcast_start(struct lagg_softc *sc, struct mbuf *m) { - int active_ports = 0; int errors = 0; int ret; struct lagg_port *lp, *last = NULL; @@ -2348,8 +2347,6 @@ lagg_bcast_start(struct lagg_softc *sc, struct mbuf *m) if (!LAGG_PORTACTIVE(lp)) continue; - active_ports++; - if (last != NULL) { m0 = m_copym(m, 0, M_COPYALL, M_NOWAIT); if (m0 == NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207241101.26OB1qCj040871>