Author: Alexandre Ganea Date: 2025-04-11T17:49:26-04:00 New Revision: 84ed81bc8a5359f33818c876e43f6450e98deb35
URL: https://github.com/llvm/llvm-project/commit/84ed81bc8a5359f33818c876e43f6450e98deb35 DIFF: https://github.com/llvm/llvm-project/commit/84ed81bc8a5359f33818c876e43f6450e98deb35.diff LOG: [lldb] On Windows, silence warning when building with Clang ToT Fixes: ``` [930/2017] Building CXX object tools\lldb\unittests\Thread\CMakeFiles\ThreadTests.dir\ThreadTest.cpp.obj C:\git\llvm-project\lldb\unittests\Thread\ThreadTest.cpp(51,23): warning: cast from 'FARPROC' (aka 'long long (*)()') to 'SetThreadDescriptionFunctionPtr' (aka 'long (*)(void *, const wchar_t *)') converts to incompatible function type [-Wcast-function-type-mismatch] 51 | SetThreadName = reinterpret_cast<SetThreadDescriptionFunctionPtr>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 52 | ::GetProcAddress(hModule, "SetThreadDescription")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. ``` Added: Modified: lldb/unittests/Thread/ThreadTest.cpp Removed: ################################################################################ diff --git a/lldb/unittests/Thread/ThreadTest.cpp b/lldb/unittests/Thread/ThreadTest.cpp index 542585969c07b..4e87b3eb435b2 100644 --- a/lldb/unittests/Thread/ThreadTest.cpp +++ b/lldb/unittests/Thread/ThreadTest.cpp @@ -49,7 +49,7 @@ class ThreadTest : public ::testing::Test { HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll"); if (hModule) { SetThreadName = reinterpret_cast<SetThreadDescriptionFunctionPtr>( - ::GetProcAddress(hModule, "SetThreadDescription")); + (void *)::GetProcAddress(hModule, "SetThreadDescription")); } PlatformWindows::Initialize(); #endif _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits