diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp index db80eb383885..e0210aa0ac36 100644 --- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp @@ -241,8 +241,8 @@ size_t PageSize() { void SetThreadName(std::thread &thread, const std::string &name) { typedef HRESULT(WINAPI * proc)(HANDLE, PCWSTR); HMODULE kbase = GetModuleHandleA("KernelBase.dll"); - proc ThreadNameProc = - reinterpret_cast(GetProcAddress(kbase, "SetThreadDescription")); + proc ThreadNameProc = reinterpret_cast( + (void *)GetProcAddress(kbase, "SetThreadDescription")); if (ThreadNameProc) { std::wstring buf; auto sz = MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, nullptr, 0); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp index aae3e76ea229..1ff8b8f1bab4 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp @@ -65,12 +65,13 @@ void InitializeDbgHelpIfNeeded() { HMODULE dbghelp = LoadLibraryA("dbghelp.dll"); CHECK(dbghelp && "failed to load dbghelp.dll"); -#define DBGHELP_IMPORT(name) \ - do { \ - name = \ - reinterpret_cast(GetProcAddress(dbghelp, #name)); \ - CHECK(name != nullptr); \ - } while (0) +# define DBGHELP_IMPORT(name) \ + do { \ + name = reinterpret_cast( \ + (void *)GetProcAddress(dbghelp, #name)); \ + CHECK(name != nullptr); \ + } while (0) + DBGHELP_IMPORT(StackWalk64); DBGHELP_IMPORT(SymCleanup); DBGHELP_IMPORT(SymFromAddr);