Merge "Fix cast-function-type on windows" into main
diff --git a/src/base/thread_utils.cc b/src/base/thread_utils.cc
index 086c587..5e18bdb 100644
--- a/src/base/thread_utils.cc
+++ b/src/base/thread_utils.cc
@@ -56,8 +56,9 @@
bool MaybeSetThreadName(const std::string& name) {
// The SetThreadDescription API works even if no debugger is attached.
static auto set_thread_description_func =
- reinterpret_cast<SetThreadDescription>(::GetProcAddress(
- ::GetModuleHandleA("Kernel32.dll"), "SetThreadDescription"));
+ reinterpret_cast<SetThreadDescription>(
+ reinterpret_cast<void*>(::GetProcAddress(
+ ::GetModuleHandleA("Kernel32.dll"), "SetThreadDescription")));
if (!set_thread_description_func) {
return false;
}
@@ -72,8 +73,9 @@
bool GetThreadName(std::string& out_result) {
static auto get_thread_description_func =
- reinterpret_cast<GetThreadDescription>(::GetProcAddress(
- ::GetModuleHandleA("Kernel32.dll"), "GetThreadDescription"));
+ reinterpret_cast<GetThreadDescription>(
+ reinterpret_cast<void*>(::GetProcAddress(
+ ::GetModuleHandleA("Kernel32.dll"), "GetThreadDescription")));
if (!get_thread_description_func) {
return false;
}