diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-16 12:24:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 12:24:44 +0100 |
commit | 613503755103b6195488992f922dffedf2258a2a (patch) | |
tree | 300762c3c7337c9fc55c977ac368cd87d1812aca | |
parent | a2c90fe2f366bea6974cf4b14373b15e1b83568b (diff) | |
parent | e33914e0c1df4344a7b2f3bd9f56b4a6f43af445 (diff) |
Merge pull request #35193 from akien-mga/i-live-in-the-void
MinGW: Avoid GCC -Wcast-function-type warnings on GetProcAddress
-rw-r--r-- | platform/windows/context_gl_windows.cpp | 5 | ||||
-rw-r--r-- | platform/windows/joypad_windows.cpp | 5 | ||||
-rwxr-xr-x | platform/windows/os_windows.cpp | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/platform/windows/context_gl_windows.cpp b/platform/windows/context_gl_windows.cpp index 434d685250..ad62e3a306 100644 --- a/platform/windows/context_gl_windows.cpp +++ b/platform/windows/context_gl_windows.cpp @@ -43,6 +43,11 @@ #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#if defined(__GNUC__) +// Workaround GCC warning from -Wcast-function-type. +#define wglGetProcAddress (void *)wglGetProcAddress +#endif + typedef HGLRC(APIENTRY *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int *); void ContextGL_Windows::release_current() { diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp index c82a90bf7d..49432435b9 100644 --- a/platform/windows/joypad_windows.cpp +++ b/platform/windows/joypad_windows.cpp @@ -37,6 +37,11 @@ #define __builtin_bswap32 _byteswap_ulong #endif +#if defined(__GNUC__) +// Workaround GCC warning from -Wcast-function-type. +#define GetProcAddress (void *)GetProcAddress +#endif + DWORD WINAPI _xinput_get_state(DWORD dwUserIndex, XINPUT_STATE *pState) { return ERROR_DEVICE_NOT_CONNECTED; } diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 3868d0bc63..a6977a7a86 100755 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -74,6 +74,11 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; #define WM_POINTERUPDATE 0x0245 #endif +#if defined(__GNUC__) +// Workaround GCC warning from -Wcast-function-type. +#define GetProcAddress (void *)GetProcAddress +#endif + typedef struct { int count; int screen; |