Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2022 17:32:00 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 19f184797e2c - stable/12 - bhyve: fix -Wunused-but-set-variable warning
Message-ID:  <202208251732.27PHW0wM043951@gitrepo.freebsd.org>

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

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

commit 19f184797e2c22165a4798ccc8b3035648268824
Author:     Robert Wing <rew@FreeBSD.org>
AuthorDate: 2021-12-06 19:52:08 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-08-25 16:39:56 +0000

    bhyve: fix -Wunused-but-set-variable warning
    
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D33306
    
    (cherry picked from commit 2616ee608cd54e544259ee738cd8b8ff71334ced)
---
 usr.sbin/bhyve/pci_e82545.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/usr.sbin/bhyve/pci_e82545.c b/usr.sbin/bhyve/pci_e82545.c
index 2a1e54d89c59..aeef3f84ee5d 100644
--- a/usr.sbin/bhyve/pci_e82545.c
+++ b/usr.sbin/bhyve/pci_e82545.c
@@ -1081,7 +1081,7 @@ e82545_transmit(struct e82545_softc *sc, uint16_t head, uint16_t tail,
 	struct ck_info ckinfo[2];
 	struct iovec *iov;
 	union  e1000_tx_udesc *dsc;
-	int desc, dtype, len, ntype, iovcnt, tlen, tcp, tso;
+	int desc, dtype, len, ntype, iovcnt, tcp, tso;
 	int mss, paylen, seg, tiovcnt, left, now, nleft, nnow, pv, pvoff;
 	unsigned hdrlen, vlen;
 	uint32_t tcpsum, tcpseq;
@@ -1089,7 +1089,6 @@ e82545_transmit(struct e82545_softc *sc, uint16_t head, uint16_t tail,
 
 	ckinfo[0].ck_valid = ckinfo[1].ck_valid = 0;
 	iovcnt = 0;
-	tlen = 0;
 	ntype = 0;
 	tso = 0;
 	ohead = head;
@@ -1147,7 +1146,6 @@ e82545_transmit(struct e82545_softc *sc, uint16_t head, uint16_t tail,
 			if ((dsc->td.lower.data & E1000_TXD_CMD_EOP) != 0 &&
 			    (dsc->td.lower.data & E1000_TXD_CMD_IFCS) == 0)
 				len -= 2;
-			tlen += len;
 			if (iovcnt < I82545_MAX_TXSEGS) {
 				iov[iovcnt].iov_base = paddr_guest2host(
 				    sc->esc_ctx, dsc->td.buffer_addr, len);



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