Commit 152150a4 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

openvr: Fix a -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.)

Merges one line from upstream 5d0574bf6473130d25dd296ad30206ccd148590b

Bug: 550065
Change-Id: I54080e807e2106ff084adc6e0f7954a72bdf467f
Reviewed-on: https://chromium-review.googlesource.com/953722Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541776}
parent a49090b7
...@@ -22,7 +22,7 @@ SharedLibHandle SharedLib_Load( const char *pchPath ) ...@@ -22,7 +22,7 @@ SharedLibHandle SharedLib_Load( const char *pchPath )
void *SharedLib_GetFunction( SharedLibHandle lib, const char *pchFunctionName) void *SharedLib_GetFunction( SharedLibHandle lib, const char *pchFunctionName)
{ {
#if defined( _WIN32) #if defined( _WIN32)
return GetProcAddress( (HMODULE)lib, pchFunctionName ); return (void*)GetProcAddress( (HMODULE)lib, pchFunctionName );
#elif defined(POSIX) #elif defined(POSIX)
return dlsym( lib, pchFunctionName ); return dlsym( lib, pchFunctionName );
#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