git: 1cde21402ab7 - main - cdceem(4): Fix "set but not used" warnings

From: Edward Tomasz Napierala <trasz_at_FreeBSD.org>
Date: Mon, 29 Nov 2021 16:49:19 UTC
The branch main has been updated by trasz:

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

commit 1cde21402ab7c2527dec1050f37b14ae077eafe7
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-11-29 16:42:59 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-11-29 16:45:15 +0000

    cdceem(4): Fix "set but not used" warnings
    
    No functional changes.
    
    Sponsored By:   EPSRC
---
 sys/dev/usb/net/if_cdceem.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sys/dev/usb/net/if_cdceem.c b/sys/dev/usb/net/if_cdceem.c
index 92441d8173ee..7c56a3482402 100644
--- a/sys/dev/usb/net/if_cdceem.c
+++ b/sys/dev/usb/net/if_cdceem.c
@@ -571,7 +571,7 @@ cdceem_send_echo(struct usb_xfer *xfer, int *offp)
 {
 	struct cdceem_softc *sc;
 	struct usb_page_cache *pc;
-	int maxlen, off;
+	int maxlen __diagused, off;
 	uint16_t hdr;
 
 	off = *offp;
@@ -610,7 +610,7 @@ cdceem_send_echo_response(struct usb_xfer *xfer, int *offp)
 {
 	struct cdceem_softc *sc;
 	struct usb_page_cache *pc;
-	int maxlen, off;
+	int maxlen __diagused, off;
 	uint16_t hdr;
 
 	off = *offp;
@@ -650,7 +650,7 @@ cdceem_send_data(struct usb_xfer *xfer, int *offp)
 	struct usb_page_cache *pc;
 	struct ifnet *ifp;
 	struct mbuf *m;
-	int maxlen, off;
+	int maxlen __diagused, off;
 	uint32_t crc;
 	uint16_t hdr;
 
@@ -714,7 +714,7 @@ cdceem_bulk_write_callback(struct usb_xfer *xfer, usb_error_t usb_error)
 {
 	struct cdceem_softc *sc;
 	struct ifnet *ifp;
-	int actlen, aframes, maxlen, off;
+	int actlen, aframes, maxlen __diagused, off;
 
 	sc = usbd_xfer_softc(xfer);
 	maxlen = usbd_xfer_max_len(xfer);
@@ -783,9 +783,8 @@ static uint32_t
 cdceem_m_crc32(struct mbuf *m, uint32_t src_offset, uint32_t src_len)
 {
 	uint32_t crc = 0xFFFFFFFF;
-	int error;
 
-	error = m_apply(m, src_offset, src_len, cdceem_m_crc32_cb, &crc);
+	m_apply(m, src_offset, src_len, cdceem_m_crc32_cb, &crc);
 	return (crc ^ 0xFFFFFFFF);
 }