From a64536b45fe5ab25bbbc8ee2a40402b5727da82c Mon Sep 17 00:00:00 2001 From: wraitii Date: Tue, 2 Mar 2021 15:00:33 +0000 Subject: [PATCH] Fix MSVC unknown pragma warning Follows f3aedf88a6. Reported by: Stan Reviewed By: Stan Differential Revision: https://code.wildfiregames.com/D3623 This was SVN commit r24976. --- source/scriptinterface/FunctionWrapper.h | 4 ++++ 1 file changed, 4 insertions(+) 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));