Skip to content

Commit b244a74

Browse files
committed
lkl: posix-host: Fix -Wcast-function-type
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 <[email protected]>
1 parent 27aab0b commit b244a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/lkl/lib/posix-host.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static void mutex_free(struct lkl_mutex *_mutex)
186186
static lkl_thread_t thread_create(void (*fn)(void *), void *arg)
187187
{
188188
pthread_t thread;
189-
if (WARN_PTHREAD(pthread_create(&thread, NULL, (void* (*)(void *))fn, arg)))
189+
if (WARN_PTHREAD(pthread_create(&thread, NULL, (void *)fn, arg)))
190190
return 0;
191191
else
192192
return (lkl_thread_t) thread;
@@ -267,7 +267,7 @@ static void *timer_alloc(void (*fn)(void *), void *arg)
267267
.sigev_value = {
268268
.sival_ptr = arg,
269269
},
270-
.sigev_notify_function = (void (*)(union sigval))fn,
270+
.sigev_notify_function = (void (*)())fn,
271271
};
272272

273273
err = timer_create(CLOCK_REALTIME, &se, &timer);

0 commit comments

Comments
 (0)