Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Dec 2021 12:09:47 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a0f49d676873 - main - hn: plug set-but-not-unused vars
Message-ID:  <202112101209.1BAC9llE029659@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg:

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

commit a0f49d676873d0c7c0413aba67a837d4e549cab9
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-12-10 12:09:26 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-12-10 12:09:26 +0000

    hn: plug set-but-not-unused vars
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/dev/hyperv/netvsc/if_hn.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index 025baaa60152..3d13bd696c94 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -2710,7 +2710,7 @@ hn_txdesc_put(struct hn_tx_ring *txr, struct hn_txdesc *txd)
 		struct hn_txdesc *tmp_txd;
 
 		while ((tmp_txd = STAILQ_FIRST(&txd->agg_list)) != NULL) {
-			int freed;
+			int freed __diagused;
 
 			KASSERT(STAILQ_EMPTY(&tmp_txd->agg_list),
 			    ("resursive aggregation on aggregated txdesc"));
@@ -3209,7 +3209,7 @@ hn_encap(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd,
 
 	error = hn_txdesc_dmamap_load(txr, txd, &m_head, segs, &nsegs);
 	if (__predict_false(error)) {
-		int freed;
+		int freed __diagused;
 
 		/*
 		 * This mbuf is not linked w/ the txd yet, so free it now.
@@ -3313,7 +3313,7 @@ again:
 		hn_txdesc_put(txr, txd);
 
 	if (__predict_false(error)) {
-		int freed;
+		int freed __diagused;
 
 		/*
 		 * This should "really rarely" happen.
@@ -5435,7 +5435,7 @@ hn_txdesc_gc(struct hn_tx_ring *txr, struct hn_txdesc *txd)
 
 	/* Aggregated txds will be freed by their aggregating txd. */
 	if (txd->refs > 0 && (txd->flags & HN_TXD_FLAG_ONAGG) == 0) {
-		int freed;
+		int freed __diagused;
 
 		freed = hn_txdesc_put(txr, txd);
 		KASSERT(freed, ("can't free txdesc"));



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