diff --git a/source/scriptinterface/FunctionWrapper.h b/source/scriptinterface/FunctionWrapper.h index 8a27937cfb..63acca1b5b 100644 --- a/source/scriptinterface/FunctionWrapper.h +++ b/source/scriptinterface/FunctionWrapper.h @@ -213,8 +213,10 @@ public: ScriptRequest rq(*scriptInterface); // GCC 7 triggers spurious warnings +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress" +#endif ObjType* obj = nullptr; if constexpr (thisGetter != nullptr) { @@ -222,7 +224,9 @@ public: if (!obj) return false; } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif bool went_ok = true; typename args_info::arg_types outs = ConvertFromJS(ScriptInterface::GetScriptInterfaceAndCBData(cx), rq, args, went_ok, static_cast::arg_types*>(nullptr));