diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 7821499a85..36bd07fad4 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -85,7 +85,7 @@ void SetCurrentThreadPriority(ThreadPriority new_priority) { // Sets the debugger-visible name of the current thread. void SetCurrentThreadName(const char* name) { - if (auto pf = (decltype(&SetThreadDescription))GetProcAddress(GetModuleHandle(TEXT("KernelBase.dll")), "SetThreadDescription"); pf) + if (auto pf = (decltype(&SetThreadDescription))(void*)GetProcAddress(GetModuleHandle(TEXT("KernelBase.dll")), "SetThreadDescription"); pf) pf(GetCurrentThread(), UTF8ToUTF16W(name).data()); // Windows 10+ else ; // No-op