diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c index 6a3f853e073d..fc9e67c21fe9 100644 --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -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); diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c index 6a82391307f1..785244e5e964 100644 --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -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));