From 73aa8b9a756944e20ec506f1f0c5ad13afc70e7a Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Fri, 16 May 2014 21:19:17 +0000 Subject: [PATCH] Remove some unused variables. Found with: Clang Static Analyzer MFC after: 2 weeks --- sys/dev/firewire/sbp.c | 2 -- sys/dev/my/if_my.c | 2 -- sys/dev/nfe/if_nfe.c | 9 +++------ sys/dev/siba/siba_core.c | 2 -- sys/dev/sis/if_sis.c | 2 -- sys/dev/sk/if_sk.c | 2 -- sys/dev/tx/if_tx.c | 2 -- sys/dev/usb/net/if_axge.c | 2 -- 8 files changed, 3 insertions(+), 20 deletions(-) diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 22ffc9479949..e922942cd489 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -2748,7 +2748,6 @@ sbp_dequeue_ocb(struct sbp_dev *sdev, struct sbp_status *sbp_status) struct sbp_ocb *ocb; struct sbp_ocb *next; int s = splfw(), order = 0; - int flags; SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev, @@ -2762,7 +2761,6 @@ END_DEBUG SBP_LOCK(sdev->target->sbp); for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { next = STAILQ_NEXT(ocb, ocb); - flags = ocb->flags; if (OCB_MATCH(ocb, sbp_status)) { /* found */ STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index 98a226301149..f8df05998d24 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -658,10 +658,8 @@ static void my_setmode_mii(struct my_softc * sc, int media) { u_int16_t bmcr; - struct ifnet *ifp; MY_LOCK_ASSERT(sc); - ifp = sc->my_ifp; /* * If an autoneg session is in progress, stop it. */ diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index d9814e3bde0b..806a4ee95bcb 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -1376,15 +1376,12 @@ nfe_free_rx_ring(struct nfe_softc *sc, struct nfe_rx_ring *ring) { struct nfe_rx_data *data; void *desc; - int i, descsize; + int i; - if (sc->nfe_flags & NFE_40BIT_ADDR) { + if (sc->nfe_flags & NFE_40BIT_ADDR) desc = ring->desc64; - descsize = sizeof (struct nfe_desc64); - } else { + else desc = ring->desc32; - descsize = sizeof (struct nfe_desc32); - } for (i = 0; i < NFE_RX_RING_COUNT; i++) { data = &ring->data[i]; diff --git a/sys/dev/siba/siba_core.c b/sys/dev/siba/siba_core.c index 7527261b2bb2..6d32531c3880 100644 --- a/sys/dev/siba/siba_core.c +++ b/sys/dev/siba/siba_core.c @@ -1740,12 +1740,10 @@ static void siba_pcicore_init(struct siba_pci *spc) { struct siba_dev_softc *sd = spc->spc_dev; - struct siba_softc *siba; if (sd == NULL) return; - siba = sd->sd_bus; if (!siba_dev_isup_sub(sd)) siba_dev_up_sub(sd, 0); diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c index 7b0fc88e5035..632b38457dba 100644 --- a/sys/dev/sis/if_sis.c +++ b/sys/dev/sis/if_sis.c @@ -1617,11 +1617,9 @@ sis_tick(void *xsc) { struct sis_softc *sc; struct mii_data *mii; - struct ifnet *ifp; sc = xsc; SIS_LOCK_ASSERT(sc); - ifp = sc->sis_ifp; mii = device_get_softc(sc->sis_miibus); mii_tick(mii); diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 68520ea17285..03cd165a0b66 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -2877,13 +2877,11 @@ static void sk_txeof(sc_if) struct sk_if_softc *sc_if; { - struct sk_softc *sc; struct sk_txdesc *txd; struct sk_tx_desc *cur_tx; struct ifnet *ifp; u_int32_t idx, sk_ctl; - sc = sc_if->sk_softc; ifp = sc_if->sk_ifp; txd = STAILQ_FIRST(&sc_if->sk_cdata.sk_txbusyq); diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c index 1c73aca5d808..a15062795dd5 100644 --- a/sys/dev/tx/if_tx.c +++ b/sys/dev/tx/if_tx.c @@ -1151,12 +1151,10 @@ epic_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { epic_softc_t *sc; struct mii_data *mii; - struct ifmedia *ifm; sc = ifp->if_softc; mii = device_get_softc(sc->miibus); EPIC_LOCK(sc); - ifm = &mii->mii_media; /* Nothing should be selected if interface is down. */ if ((ifp->if_flags & IFF_UP) == 0) { diff --git a/sys/dev/usb/net/if_axge.c b/sys/dev/usb/net/if_axge.c index 8d1d7c1945e2..caadb60fe5ee 100644 --- a/sys/dev/usb/net/if_axge.c +++ b/sys/dev/usb/net/if_axge.c @@ -910,7 +910,6 @@ axge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) static int axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) { - struct axge_softc *sc; struct axge_csum_hdr csum_hdr; int error, len, pos; int pkt_cnt; @@ -918,7 +917,6 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) uint16_t hdr_off; uint16_t pktlen; - sc = uether_getsc(ue); pos = 0; len = 0; error = 0;