[UCRT] Add casts to make GCC happy

This commit is contained in:
Timo Kreuzer 2024-10-13 19:22:21 +03:00
parent dbd58d7666
commit 0cdde63c57

View file

@ -126,7 +126,7 @@ static __acrt_thread_parameter* __cdecl create_thread_parameter(
return nullptr; return nullptr;
} }
parameter.get()->_procedure = procedure; parameter.get()->_procedure = reinterpret_cast<void*>(procedure);
parameter.get()->_context = context; parameter.get()->_context = context;
// Attempt to bump the reference count of the module in which the user's // 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<uintptr_t>(INVALID_HANDLE_VALUE)); _VALIDATE_RETURN(procedure != nullptr, EINVAL, reinterpret_cast<uintptr_t>(INVALID_HANDLE_VALUE));
unique_thread_parameter parameter(create_thread_parameter(procedure, context)); unique_thread_parameter parameter(create_thread_parameter(reinterpret_cast<void*>(procedure), context));
if (!parameter) if (!parameter)
{ {
return reinterpret_cast<uintptr_t>(INVALID_HANDLE_VALUE); return reinterpret_cast<uintptr_t>(INVALID_HANDLE_VALUE);
@ -199,7 +199,7 @@ extern "C" uintptr_t __cdecl _beginthreadex(
{ {
_VALIDATE_RETURN(procedure != nullptr, EINVAL, 0); _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) if (!parameter)
{ {
return 0; return 0;