Skip to content

Commit

Permalink
lkl: posix-host: Fix -Wcast-function-type
Browse files Browse the repository at this point in the history
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 <rondom@rondom.de>
  • Loading branch information
Rondom committed Dec 2, 2019
1 parent 27aab0b commit 3c72f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/lkl/lib/posix-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3c72f4a

Please sign in to comment.