1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Disable warnings around incompatible function pointer cast (#9543)

This addresses a compilation issue with newer (8+) mingw.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
This commit is contained in:
Michał Janiszewski
2020-04-24 16:03:03 +02:00
committed by GitHub
parent 76c10d1806
commit 295a98028e

View File

@@ -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{};