diff --git a/evthread-internal.h b/evthread-internal.h index 16adf167..efdecf81 100644 --- a/evthread-internal.h +++ b/evthread-internal.h @@ -377,9 +377,9 @@ int evutil_global_setup_locks_(const int enable_locks); int evutil_secure_rng_global_setup_locks_(const int enable_locks); /** Return current evthread_lock_callbacks */ -struct evthread_lock_callbacks *evthread_get_lock_callbacks(); +struct evthread_lock_callbacks *evthread_get_lock_callbacks(void); /** Return current evthread_condition_callbacks */ -struct evthread_condition_callbacks *evthread_get_condition_callbacks(); +struct evthread_condition_callbacks *evthread_get_condition_callbacks(void); /** Disable locking for internal usage (like global shutdown) */ void evthreadimpl_disable_lock_debugging_(void); diff --git a/test/regress_bufferevent.c b/test/regress_bufferevent.c index a1998ba6..a87e02ed 100644 --- a/test/regress_bufferevent.c +++ b/test/regress_bufferevent.c @@ -233,10 +233,11 @@ static lock_wrapper *lu_find(void *lock_) static void *trace_lock_alloc(unsigned locktype) { + void *lock; ++lu_base.nr_locks; lu_base.locks = realloc(lu_base.locks, sizeof(lock_wrapper) * lu_base.nr_locks); - void *lock = lu_base.cbs.alloc(locktype); + lock = lu_base.cbs.alloc(locktype); lu_base.locks[lu_base.nr_locks - 1] = (lock_wrapper){ lock, ALLOC, 0 }; return lock; } @@ -273,7 +274,7 @@ static int trace_lock_unlock(unsigned mode, void *lock_) return lu_base.cbs.unlock(mode, lock_); } } -static void lock_unlock_free_thread_cbs() +static void lock_unlock_free_thread_cbs(void) { event_base_free(NULL);