From 3c72f4ae14910ca8c08652bfe7893359178109c7 Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Sun, 17 Nov 2019 22:30:13 +0100 Subject: [PATCH] lkl: posix-host: Fix -Wcast-function-type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lib/posix-host.c:189:49: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void * (*)(void *)’ [-Wcast-function-type] lib/posix-host.c:270:28: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(union sigval)’ [-Wcast-function-type] Signed-off-by: Andreas Gnau --- tools/lkl/lib/posix-host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lkl/lib/posix-host.c b/tools/lkl/lib/posix-host.c index db63ed7e35fb19..f1ae3a2e6dbb37 100644 --- a/tools/lkl/lib/posix-host.c +++ b/tools/lkl/lib/posix-host.c @@ -186,7 +186,7 @@ static void mutex_free(struct lkl_mutex *_mutex) static lkl_thread_t thread_create(void (*fn)(void *), void *arg) { pthread_t thread; - if (WARN_PTHREAD(pthread_create(&thread, NULL, (void* (*)(void *))fn, arg))) + if (WARN_PTHREAD(pthread_create(&thread, NULL, (void *)fn, arg))) return 0; else return (lkl_thread_t) thread; @@ -267,7 +267,7 @@ static void *timer_alloc(void (*fn)(void *), void *arg) .sigev_value = { .sival_ptr = arg, }, - .sigev_notify_function = (void (*)(union sigval))fn, + .sigev_notify_function = (void (*)())fn, }; err = timer_create(CLOCK_REALTIME, &se, &timer);