Skip to content

Commit a819b0e

Browse files
committed
[lldb] Silence warning
This fixes the following warning, when building with Clang ToT on Windows: ``` [6668/7618] Building CXX object tools\lldb\source\Plugins\Process\Windows\Common\CMakeFiles\lldbPluginProcessWindowsCommon.dir\TargetThreadWindows.cpp.obj C:\src\git\llvm-project\lldb\source\Plugins\Process\Windows\Common\TargetThreadWindows.cpp(182,22): warning: cast from 'FARPROC' (aka 'long long (*)()') to 'GetThreadDescriptionFunctionPtr' (aka 'long (*)(void *, wchar_t **)') converts to incompatible function type [-Wcast-function-type-mismatch] ``` This is similar to: #97905
1 parent 7202fe5 commit a819b0e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,10 @@ const char *TargetThreadWindows::GetName() {
179179
Log *log = GetLog(LLDBLog::Thread);
180180
static GetThreadDescriptionFunctionPtr GetThreadDescription = []() {
181181
HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll");
182-
return hModule ? reinterpret_cast<GetThreadDescriptionFunctionPtr>(
183-
::GetProcAddress(hModule, "GetThreadDescription"))
184-
: nullptr;
182+
return hModule
183+
? reinterpret_cast<GetThreadDescriptionFunctionPtr>(
184+
(void *)::GetProcAddress(hModule, "GetThreadDescription"))
185+
: nullptr;
185186
}();
186187
LLDB_LOGF(log, "GetProcAddress: %p",
187188
reinterpret_cast<void *>(GetThreadDescription));

0 commit comments

Comments
 (0)