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ł JaniszewskiandGymnasiast authored and GitHub committed 2020-04-24 16:03:03 +02:00
1 parent 76c10d1806
commit 295a98028e
1 file changed
+7
+7
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{};