From 1c0336c1c15b6db161745ec494aba4d69e865d78 Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Sat, 19 May 2018 05:06:18 +0000 Subject: [PATCH] kevent: annotate unused stack local --- sys/kern/kern_event.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 06a63497f539..aea994f036bb 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -751,14 +751,12 @@ static void filt_timerdetach(struct knote *kn) { struct kq_timer_cb_data *kc; -#ifdef INVARIANTS - unsigned int old; -#endif + unsigned int old __unused; kc = kn->kn_ptr.p_v; callout_drain(&kc->c); 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")); kn->kn_status |= KN_DETACHED; /* knlist_remove sets it */ }