From b0ff7eb5ce55679cf6b47088078563bf37fef1c9 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Sun, 10 Apr 2011 14:03:39 +0200 Subject: [PATCH] Add an assert to appease clang's static analyzer It got confused because in EVLOCK_ASSERT_LOCKED(lock) there is an if (lock) check. --- evthread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/evthread.c b/evthread.c index 35f14b2b..2cfb76e9 100644 --- a/evthread.c +++ b/evthread.c @@ -217,6 +217,7 @@ debug_cond_wait(void *_cond, void *_lock, const struct timeval *tv) { int r; struct debug_lock *lock = _lock; + EVUTIL_ASSERT(lock); EVLOCK_ASSERT_LOCKED(_lock); evthread_debug_lock_mark_unlocked(0, lock); r = _original_cond_fns.wait_condition(_cond, lock->lock, tv);