Date: Sat, 19 May 2018 05:27:49 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333864 - head/sys/net Message-ID: <201805190527.w4J5RncB063385@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Sat May 19 05:27:49 2018 New Revision: 333864 URL: https://svnweb.freebsd.org/changeset/base/333864 Log: net: fix set but not used Modified: head/sys/net/if_clone.c head/sys/net/if_epair.c head/sys/net/if_lagg.c head/sys/net/if_stf.c head/sys/net/if_vxlan.c head/sys/net/iflib.c Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_clone.c Sat May 19 05:27:49 2018 (r333864) @@ -416,7 +416,7 @@ if_clone_simple(const char *name, ifcs_create_t create for (unit = 0; unit < minifs; unit++) { char name[IFNAMSIZ]; - int error; + int error __unused; snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit); error = if_clone_createif(ifc, name, IFNAMSIZ, NULL); Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_epair.c Sat May 19 05:27:49 2018 (r333864) @@ -251,7 +251,7 @@ static void epair_nh_sintr(struct mbuf *m) { struct ifnet *ifp; - struct epair_softc *sc; + struct epair_softc *sc __unused; ifp = m->m_pkthdr.rcvif; (*ifp->if_input)(ifp, m); @@ -296,7 +296,7 @@ epair_nh_drainedcpu(u_int cpuid) IFQ_LOCK(&ifp->if_snd); if (IFQ_IS_EMPTY(&ifp->if_snd)) { - struct epair_softc *sc; + struct epair_softc *sc __unused; STAILQ_REMOVE(&epair_dpcpu->epair_ifp_drain_list, elm, epair_ifp_drain, ifp_next); @@ -337,7 +337,7 @@ epair_remove_ifp_from_draining(struct ifnet *ifp) STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next, tvar) { if (ifp == elm->ifp) { - struct epair_softc *sc; + struct epair_softc *sc __unused; STAILQ_REMOVE( &epair_dpcpu->epair_ifp_drain_list, elm, Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_lagg.c Sat May 19 05:27:49 2018 (r333864) @@ -1641,10 +1641,7 @@ static int lagg_transmit(struct ifnet *ifp, struct mbuf *m) { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; - int error, len, mcast; - - len = m->m_pkthdr.len; - mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0; + int error; LAGG_RLOCK(); /* We need a Tx algorithm and at least one port */ Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_stf.c Sat May 19 05:27:49 2018 (r333864) @@ -272,7 +272,7 @@ static int stf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) { struct stf_softc *sc = ifp->if_softc; - int err; + int err __unused; err = encap_detach(sc->encap_cookie); KASSERT(err == 0, ("Unexpected error detaching encap_cookie")); Modified: head/sys/net/if_vxlan.c ============================================================================== --- head/sys/net/if_vxlan.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_vxlan.c Sat May 19 05:27:49 2018 (r333864) @@ -588,7 +588,7 @@ vxlan_ftable_update_locked(struct vxlan_softc *sc, struct rm_priotracker *tracker) { struct vxlan_ftable_entry *fe; - int error; + int error __unused; VXLAN_LOCK_ASSERT(sc); @@ -863,8 +863,9 @@ static void vxlan_socket_destroy(struct vxlan_socket *vso) { struct socket *so; - struct vxlan_socket_mc_info *mc; +#ifdef INVARIANTS int i; + struct vxlan_socket_mc_info *mc; for (i = 0; i < VXLAN_SO_MC_MAX_GROUPS; i++) { mc = &vso->vxlso_mc[i]; @@ -878,7 +879,7 @@ vxlan_socket_destroy(struct vxlan_socket *vso) ("%s: socket %p vni_hash[%d] not empty", __func__, vso, i)); } - +#endif so = vso->vxlso_sock; if (so != NULL) { vso->vxlso_sock = NULL; @@ -2505,7 +2506,7 @@ vxlan_rcv_udp_packet(struct mbuf *m, int offset, struc struct vxlan_socket *vso; struct vxlan_header *vxh, vxlanhdr; uint32_t vni; - int error; + int error __unused; M_ASSERTPKTHDR(m); vso = xvso; Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/iflib.c Sat May 19 05:27:49 2018 (r333864) @@ -1270,7 +1270,6 @@ static void iflib_gen_mac(if_ctx_t ctx) { struct thread *td; - struct ifnet *ifp; MD5_CTX mdctx; char uuid[HOSTUUIDLEN+1]; char buf[HOSTUUIDLEN+16]; @@ -1278,7 +1277,6 @@ iflib_gen_mac(if_ctx_t ctx) unsigned char digest[16]; td = curthread; - ifp = ctx->ifc_ifp; mac = ctx->ifc_mac; uuid[HOSTUUIDLEN] = 0; bcopy(td->td_ucred->cr_prison->pr_hostuuid, uuid, HOSTUUIDLEN); @@ -4281,10 +4279,7 @@ iflib_reset_qvalues(if_ctx_t ctx) if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; if_shared_ctx_t sctx = ctx->ifc_sctx; device_t dev = ctx->ifc_dev; - int i, main_txq, main_rxq; - - main_txq = (sctx->isc_flags & IFLIB_HAS_TXCQ) ? 1 : 0; - main_rxq = (sctx->isc_flags & IFLIB_HAS_RXCQ) ? 1 : 0; + int i; scctx->isc_txrx_budget_bytes_max = IFLIB_MAX_TX_BYTES; scctx->isc_tx_qdepth = IFLIB_DEFAULT_TX_QDEPTH;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805190527.w4J5RncB063385>