mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-28 07:48:14 +08:00
win: 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.) Upstreamed from: https://chromium-review.googlesource.com/c/chromium/src/+/953743 Change-Id: I3ed4e23395e1e01b31b7cf945ddb6f93e4e69d45 Reviewed-on: https://chromium-review.googlesource.com/959545 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
07da37aec7
commit
c27a1aaea0
@ -43,7 +43,7 @@ class ScopedModuleHandle {
|
||||
using ModuleHandle = HMODULE;
|
||||
|
||||
static void* LookUpSymbol(ModuleHandle handle, const char* symbol_name) {
|
||||
return GetProcAddress(handle, symbol_name);
|
||||
return reinterpret_cast<void*>(GetProcAddress(handle, symbol_name));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user