../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
in this case - no, but with arithmetic of course. Here, I suspect, I did miss the u, however - because in user space we use positive values for pointers and negative ones in the kernel.