Skip to content

Commit

Permalink
cdceem(4): Fix "set but not used" warnings
Browse files Browse the repository at this point in the history
No functional changes.

Sponsored By:	EPSRC
  • Loading branch information
trasz committed Nov 29, 2021
1 parent 08bb51f commit 1cde214
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sys/dev/usb/net/if_cdceem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 1cde214

Please sign in to comment.