diff options
author | glx22 <glx@openttd.org> | 2021-05-14 15:41:00 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-06-10 23:17:29 +0200 |
commit | d485b50813f3be6ba0c5ea74e9c7d97f0ef1f5d5 (patch) | |
tree | 41aa90a3a9300cafce71ccca14b138193a25c6d4 /src | |
parent | 744a9e474575af90935807620bff860c02559d76 (diff) | |
download | openttd-d485b50813f3be6ba0c5ea74e9c7d97f0ef1f5d5.tar.xz |
Fix: [MinGW] Ignore wglGetProcAddress() cast warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/video/win32_v.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 35a995b99..4afc751af 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -1265,6 +1265,12 @@ static void LoadWGLExtensions() if (rc != nullptr) { wglMakeCurrent(dc, rc); +#ifdef __MINGW32__ + /* GCC doesn't understand the expected usage of wglGetProcAddress(). */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" +#endif /* __MINGW32__ */ + /* Get list of WGL extensions. */ PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); if (wglGetExtensionsStringARB != nullptr) { @@ -1279,6 +1285,9 @@ static void LoadWGLExtensions() } } +#ifdef __MINGW32__ +#pragma GCC diagnostic pop +#endif wglMakeCurrent(nullptr, nullptr); wglDeleteContext(rc); } |