kevent: annotate unused stack local

This commit is contained in:
Matt Macy 2018-05-19 05:06:18 +00:00
parent 788390df0a
commit 1c0336c1c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333856

View File

@ -751,14 +751,12 @@ static void
filt_timerdetach(struct knote *kn) filt_timerdetach(struct knote *kn)
{ {
struct kq_timer_cb_data *kc; struct kq_timer_cb_data *kc;
#ifdef INVARIANTS unsigned int old __unused;
unsigned int old;
#endif
kc = kn->kn_ptr.p_v; kc = kn->kn_ptr.p_v;
callout_drain(&kc->c); callout_drain(&kc->c);
free(kc, M_KQUEUE); free(kc, M_KQUEUE);
DBGSET(old, atomic_fetchadd_int(&kq_ncallouts, -1)); old = atomic_fetchadd_int(&kq_ncallouts, -1);
KASSERT(old > 0, ("Number of callouts cannot become negative")); KASSERT(old > 0, ("Number of callouts cannot become negative"));
kn->kn_status |= KN_DETACHED; /* knlist_remove sets it */ kn->kn_status |= KN_DETACHED; /* knlist_remove sets it */
} }