From 8227e76845668668af18e82e6414c8774e0e2d3f Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Wed, 2 Jul 2025 07:57:48 +0200 Subject: [PATCH] Restore includes for suppressing warnings on vs2017 Commit d888b10931 remove those headers which have the side effect of suppressing some warnings on Windows using vs2017. Keep those headers around for till vs2019+. Add additional suppressions where needed for spidermonkey headers. Ref: #8086 Signed-off-by: Ralph Sennhauser --- source/gui/CGUISetting.h | 8 ++++++++ source/gui/ObjectBases/IGUIObject.cpp | 1 + source/gui/ObjectBases/IGUIObject.h | 1 + source/ps/XMB/XMBStorage.h | 8 ++++++++ 4 files changed, 18 insertions(+) diff --git a/source/gui/CGUISetting.h b/source/gui/CGUISetting.h index 1f6cfdf7d1..e5a9e17017 100644 --- a/source/gui/CGUISetting.h +++ b/source/gui/CGUISetting.h @@ -21,7 +21,15 @@ #include "lib/code_annotation.h" #include "ps/CStr.h" +#if MSC_VERSION +# pragma warning(push, 1) +# pragma warning(disable: 4068) +# pragma warning(disable: 4100) +#endif #include +#if MSC_VERSION +# pragma warning(pop) +#endif #include class IGUIObject; diff --git a/source/gui/ObjectBases/IGUIObject.cpp b/source/gui/ObjectBases/IGUIObject.cpp index 38938f9090..74ba6143dc 100644 --- a/source/gui/ObjectBases/IGUIObject.cpp +++ b/source/gui/ObjectBases/IGUIObject.cpp @@ -31,6 +31,7 @@ #include "ps/Profiler2.h" #include "scriptinterface/Object.h" #include "scriptinterface/ScriptExceptions.h" +#include "scriptinterface/ScriptExtraHeaders.h" #include "scriptinterface/ScriptRequest.h" #include "soundmanager/ISoundManager.h" diff --git a/source/gui/ObjectBases/IGUIObject.h b/source/gui/ObjectBases/IGUIObject.h index 94a9832a32..d7c9fb0578 100644 --- a/source/gui/ObjectBases/IGUIObject.h +++ b/source/gui/ObjectBases/IGUIObject.h @@ -33,6 +33,7 @@ #include "lib/input.h" #include "maths/Rect.h" #include "ps/CStr.h" +#include "scriptinterface/ScriptTypes.h" #include #include diff --git a/source/ps/XMB/XMBStorage.h b/source/ps/XMB/XMBStorage.h index 9bb4375624..a94fec358d 100644 --- a/source/ps/XMB/XMBStorage.h +++ b/source/ps/XMB/XMBStorage.h @@ -21,7 +21,15 @@ #include "lib/types.h" #include +#if MSC_VERSION +# pragma warning(push, 1) +# pragma warning(disable: 4068) +# pragma warning(disable: 4100) +#endif #include +#if MSC_VERSION +# pragma warning(pop) +#endif #include #include #include