Commit 89c78806 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

crashpad: Fix -Wmicrosoft-cast warning.

Standard C++ doesn't allow implicit conversion between function pointers
and void*. MSVC does allow that, so clang-cl also allows it but emits a
-Wmicrosoft-cast warning. We want to enable this warning to make the
compiler behave more similar on different platforms, so add an explicit
cast to void*. (GetProcAddress() returns FARPROC, a function pointer type.)

Bug: 550065
Change-Id: Ia96aaa2ef58a434ef61e7d8d0c6df9b632d6b1c2
Reviewed-on: https://chromium-review.googlesource.com/953743Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541637}
parent 29607010
...@@ -43,7 +43,7 @@ class ScopedModuleHandle { ...@@ -43,7 +43,7 @@ class ScopedModuleHandle {
using ModuleHandle = HMODULE; using ModuleHandle = HMODULE;
static void* LookUpSymbol(ModuleHandle handle, const char* symbol_name) { static void* LookUpSymbol(ModuleHandle handle, const char* symbol_name) {
return GetProcAddress(handle, symbol_name); return reinterpret_cast<void*>(GetProcAddress(handle, symbol_name));
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment