From 9c86787de5c5a80733aa80482b143f1a2f08a7e1 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 15 Jul 2022 14:48:02 +0200 Subject: [PATCH] libfast: Fix incompatible function types warning --- src/libfast/fast_dispatcher.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libfast/fast_dispatcher.c b/src/libfast/fast_dispatcher.c index 68a406122..f7b674ea6 100644 --- a/src/libfast/fast_dispatcher.c +++ b/src/libfast/fast_dispatcher.c @@ -295,7 +295,8 @@ static void cleanup_sessions(private_fast_dispatcher_t *this, time_t now) /** * Actual dispatching code */ -static void dispatch(private_fast_dispatcher_t *this) +CALLBACK(dispatch, void*, + private_fast_dispatcher_t *this) { thread_cancelability(FALSE); @@ -363,6 +364,7 @@ static void dispatch(private_fast_dispatcher_t *this) request->destroy(request); } + return NULL; } METHOD(fast_dispatcher_t, run, void, @@ -372,8 +374,7 @@ METHOD(fast_dispatcher_t, run, void, this->threads = malloc(sizeof(thread_t*) * threads); while (threads) { - this->threads[threads - 1] = thread_create((thread_main_t)dispatch, - this); + this->threads[threads - 1] = thread_create(dispatch, this); if (this->threads[threads - 1]) { threads--;