From 295a98028e104c3d42bbefbf3246e6f6bc497ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 24 Apr 2020 16:03:03 +0200 Subject: [PATCH] Disable warnings around incompatible function pointer cast (#9543) This addresses a compilation issue with newer (8+) mingw. Co-authored-by: Gymnasiast --- src/openrct2/platform/Platform.Win32.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 77129d13ed..358b38e616 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -222,7 +222,14 @@ namespace Platform if (hModule != nullptr) { using RtlGetVersionPtr = NTSTATUS(WINAPI*)(PRTL_OSVERSIONINFOW); +# if defined(__GNUC__) && __GNUC__ >= 8 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wcast-function-type" +# endif auto fn = (RtlGetVersionPtr)GetProcAddress(hModule, "RtlGetVersion"); +# if defined(__GNUC__) && __GNUC__ >= 8 +# pragma GCC diagnostic pop +# endif if (fn != nullptr) { RTL_OSVERSIONINFOW rovi{};