Skip to content

Commit 2edda3c

Browse files
adierkingrokhinip
authored andcommitted
Fix the signature of _dispatch_install_thread_detach_callback()
This function is declared as accepting a `dispatch_function_t` callback, which is a function pointer with a `void *` argument. However, the implementation and Swift overlay declare the callback without arguments, causing a conflict which Clang warns about. Change the function signature to accept the correct type. Signed-off-by: Kim Topley <[email protected]>
1 parent cad27f8 commit 2edda3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

private/queue_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ dispatch_async_enforce_qos_class_f(dispatch_queue_t queue,
438438
* "detached" before the thread exits or the application will crash.
439439
*/
440440
DISPATCH_EXPORT
441-
void _dispatch_install_thread_detach_callback(dispatch_function_t cb);
441+
void _dispatch_install_thread_detach_callback(void (*cb)(void));
442442
#endif
443443

444444
__END_DECLS

src/queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7809,7 +7809,7 @@ gettid(void)
78097809
static void (*_dispatch_thread_detach_callback)(void);
78107810

78117811
void
7812-
_dispatch_install_thread_detach_callback(dispatch_function_t cb)
7812+
_dispatch_install_thread_detach_callback(void (*cb)(void))
78137813
{
78147814
if (os_atomic_xchg(&_dispatch_thread_detach_callback, cb, relaxed)) {
78157815
DISPATCH_CLIENT_CRASH(0, "Installing a thread detach callback twice");

0 commit comments

Comments
 (0)