10159 libc: cast between incompatible function types
Review Request #1330 - Created Dec. 23, 2018 and submitted - Latest diff uploaded
Information | |
---|---|
Toomas Soome | |
illumos-gate | |
10159 | |
db1b7d8... | |
Reviewers | |
general | |
../port/threads/c11_thr.c: In function 'thrd_create': ../port/threads/c11_thr.c:198:34: error: cast between incompatible function types from 'thrd_start_t' {aka 'int (*)(void *)'} to 'void * (*)(void *)' [-Werror=cast-function-type] ret = pthread_create(thr, NULL, (void *(*)(void *))func, arg); ^ In file included from /code/illumos-gate/usr/src/lib/libc/inc/thr_uberdata.h:40, from ../port/threads/pthread.c:31: ../port/threads/pthread.c: In function 'pthread_once': /code/illumos-gate/proto/root_i386/usr/include/pthread.h:167:25: error: cast between incompatible function types from 'int (*)(mutex_t *)' {aka 'int (*)(struct _lwp_mutex *)'} to 'void (*)(void *)' [-Werror=cast-function-type] __pthread_cleanup_push((_Voidfp)(routine), (void *)(args), \ ^ ../port/threads/pthread.c:195:4: note: in expansion of macro 'pthread_cleanup_push' pthread_cleanup_push(mutex_unlock, &once->mlock); ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors