Skip to content

Commit 84ed81b

Browse files
committed
[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. ```
1 parent 93370c4 commit 84ed81b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/unittests/Thread/ThreadTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ThreadTest : public ::testing::Test {
4949
HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll");
5050
if (hModule) {
5151
SetThreadName = reinterpret_cast<SetThreadDescriptionFunctionPtr>(
52-
::GetProcAddress(hModule, "SetThreadDescription"));
52+
(void *)::GetProcAddress(hModule, "SetThreadDescription"));
5353
}
5454
PlatformWindows::Initialize();
5555
#endif

0 commit comments

Comments
 (0)