-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Hello Richard,
During compilation, I am encountering a warning that appears to be caused by a mix of POSIX threads (pthread_*) and C11 threads (<threads.h>).
It seems that some functions expecting int (*)(void *) are being passed to APIs expecting void ()(void *), and vice versa, leading to incompatible function pointer warnings.
Could you advise on the correct threading model to use, or how to resolve this mismatch?
MacOs
Apple clang version 17.0.0 (clang-1700.3.19.1)
Target: arm64-apple-darwin25.0.0
Thread model: posix
warning: cast from 'thrd_start_t' (aka 'int (*)(void *)')
to 'start_function' (aka 'void ()(void *)')
converts to incompatible function type [-Wcast-function-type-mismatch]
Metadata
Metadata
Assignees
Labels
No labels