From d25fa7fe1e99f2601996100c6b8fe0f8ef301c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 4 Apr 2023 08:52:12 +0200 Subject: [PATCH] Fix compilation with mingw GCC 12 Another case of the compiler bug found in #17371 --- src/openrct2/scripting/Plugin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openrct2/scripting/Plugin.cpp b/src/openrct2/scripting/Plugin.cpp index 6ff1fd6f70..26059a0aca 100644 --- a/src/openrct2/scripting/Plugin.cpp +++ b/src/openrct2/scripting/Plugin.cpp @@ -123,7 +123,15 @@ void Plugin::ThrowIfStopping() const void Plugin::Unload() { +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105937, fixed in GCC13 +# if defined(__GNUC__) && !defined(__clang__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +# endif _metadata.Main = {}; +# if defined(__GNUC__) && !defined(__clang__) +# pragma GCC diagnostic pop +# endif _hasLoaded = false; }