From 0cdde63c57f00dc3abfd5663fc3d5ac52c07dcbf Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 13 Oct 2024 19:22:21 +0300 Subject: [PATCH] [UCRT] Add casts to make GCC happy --- sdk/lib/ucrt/startup/thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/lib/ucrt/startup/thread.cpp b/sdk/lib/ucrt/startup/thread.cpp index 8af08c2c9c0..00ce20d8b21 100644 --- a/sdk/lib/ucrt/startup/thread.cpp +++ b/sdk/lib/ucrt/startup/thread.cpp @@ -126,7 +126,7 @@ static __acrt_thread_parameter* __cdecl create_thread_parameter( return nullptr; } - parameter.get()->_procedure = procedure; + parameter.get()->_procedure = reinterpret_cast(procedure); parameter.get()->_context = context; // Attempt to bump the reference count of the module in which the user's @@ -149,7 +149,7 @@ extern "C" uintptr_t __cdecl _beginthread( { _VALIDATE_RETURN(procedure != nullptr, EINVAL, reinterpret_cast(INVALID_HANDLE_VALUE)); - unique_thread_parameter parameter(create_thread_parameter(procedure, context)); + unique_thread_parameter parameter(create_thread_parameter(reinterpret_cast(procedure), context)); if (!parameter) { return reinterpret_cast(INVALID_HANDLE_VALUE); @@ -199,7 +199,7 @@ extern "C" uintptr_t __cdecl _beginthreadex( { _VALIDATE_RETURN(procedure != nullptr, EINVAL, 0); - unique_thread_parameter parameter(create_thread_parameter(procedure, context)); + unique_thread_parameter parameter(create_thread_parameter((void*)procedure, context)); if (!parameter) { return 0;