net: whack "set but not used" warnings in net/if.c

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Mateusz Guzik 2021-11-14 17:15:08 +00:00
parent e9c7ec2287
commit 5a4e46f6ec

View file

@ -746,7 +746,7 @@ if_free(struct ifnet *ifp)
void
if_ref(struct ifnet *ifp)
{
u_int old;
u_int old __diagused;
/* We don't assert the ifnet list lock here, but arguably should. */
old = refcount_acquire(&ifp->if_refcount);
@ -1847,7 +1847,7 @@ fail:
void
ifa_ref(struct ifaddr *ifa)
{
u_int old;
u_int old __diagused;
old = refcount_acquire(&ifa->ifa_refcnt);
KASSERT(old > 0, ("%s: ifa %p has 0 refs", __func__, ifa));