net/route: Use __diagused for variables only used in KASSERT().
This commit is contained in:
parent
b25ddb782f
commit
2174f0f2f2
@ -295,7 +295,7 @@ void
|
||||
nhgrp_ref_object(struct nhgrp_object *nhg)
|
||||
{
|
||||
struct nhgrp_priv *nhg_priv;
|
||||
u_int old;
|
||||
u_int old __diagused;
|
||||
|
||||
nhg_priv = NHGRP_PRIV(nhg);
|
||||
old = refcount_acquire(&nhg_priv->nhg_refcount);
|
||||
|
@ -631,7 +631,7 @@ destroy_nhop_epoch(epoch_context_t ctx)
|
||||
void
|
||||
nhop_ref_object(struct nhop_object *nh)
|
||||
{
|
||||
u_int old;
|
||||
u_int old __diagused;
|
||||
|
||||
old = refcount_acquire(&nh->nh_priv->nh_refcnt);
|
||||
KASSERT(old > 0, ("%s: nhop object %p has 0 refs", __func__, nh));
|
||||
|
Loading…
Reference in New Issue
Block a user