From 1580e0b51e908a19f392a413d495c395dc84e40a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 29 Nov 2021 13:06:50 -0800 Subject: [PATCH] Update standalone warning handling --- DDSTextureLoader/DDSTextureLoader11.cpp | 11 +++++++++++ DDSTextureLoader/DDSTextureLoader12.cpp | 13 +++++++++++-- DDSTextureLoader/DDSTextureLoader12.h | 3 +-- DDSTextureLoader/DDSTextureLoader9.cpp | 9 +++++++++ ScreenGrab/ScreenGrab11.cpp | 11 +++++++++++ ScreenGrab/ScreenGrab12.cpp | 11 +++++++++++ ScreenGrab/ScreenGrab9.cpp | 11 +++++++++++ WICTextureLoader/WICTextureLoader11.cpp | 18 +++++++++++------- WICTextureLoader/WICTextureLoader12.cpp | 18 +++++++++++------- WICTextureLoader/WICTextureLoader9.cpp | 17 ++++++++++------- 10 files changed, 97 insertions(+), 25 deletions(-) diff --git a/DDSTextureLoader/DDSTextureLoader11.cpp b/DDSTextureLoader/DDSTextureLoader11.cpp index 625f031..81b32b2 100644 --- a/DDSTextureLoader/DDSTextureLoader11.cpp +++ b/DDSTextureLoader/DDSTextureLoader11.cpp @@ -21,6 +21,17 @@ #include #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wcovered-switch-default" #pragma clang diagnostic ignored "-Wswitch-enum" diff --git a/DDSTextureLoader/DDSTextureLoader12.cpp b/DDSTextureLoader/DDSTextureLoader12.cpp index 170401c..ae9bcf9 100644 --- a/DDSTextureLoader/DDSTextureLoader12.cpp +++ b/DDSTextureLoader/DDSTextureLoader12.cpp @@ -26,6 +26,17 @@ #include #endif +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wtautological-type-limit-compare" #pragma clang diagnostic ignored "-Wcovered-switch-default" @@ -34,8 +45,6 @@ #pragma clang diagnostic ignored "-Wunused-macros" #endif -#pragma warning(disable : 4062) - #define D3DX12_NO_STATE_OBJECT_HELPERS #define D3DX12_NO_CHECK_FEATURE_SUPPORT_CLASS #ifdef WIN32 diff --git a/DDSTextureLoader/DDSTextureLoader12.h b/DDSTextureLoader/DDSTextureLoader12.h index 380b1b6..bc0141d 100644 --- a/DDSTextureLoader/DDSTextureLoader12.h +++ b/DDSTextureLoader/DDSTextureLoader12.h @@ -18,14 +18,13 @@ #if defined(WIN32) || defined(_WIN32) #include +#pragma comment(lib,"dxguid.lib") #else #include #include #include #endif -#pragma comment(lib,"dxguid.lib") - #include #include #include diff --git a/DDSTextureLoader/DDSTextureLoader9.cpp b/DDSTextureLoader/DDSTextureLoader9.cpp index ee21ecf..ec09071 100644 --- a/DDSTextureLoader/DDSTextureLoader9.cpp +++ b/DDSTextureLoader/DDSTextureLoader9.cpp @@ -26,6 +26,15 @@ #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wcovered-switch-default" #pragma clang diagnostic ignored "-Wswitch-enum" diff --git a/ScreenGrab/ScreenGrab11.cpp b/ScreenGrab/ScreenGrab11.cpp index cc561c2..e93bab1 100644 --- a/ScreenGrab/ScreenGrab11.cpp +++ b/ScreenGrab/ScreenGrab11.cpp @@ -35,6 +35,17 @@ #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wcovered-switch-default" #pragma clang diagnostic ignored "-Wswitch-enum" diff --git a/ScreenGrab/ScreenGrab12.cpp b/ScreenGrab/ScreenGrab12.cpp index 038ebe9..9b367c6 100644 --- a/ScreenGrab/ScreenGrab12.cpp +++ b/ScreenGrab/ScreenGrab12.cpp @@ -40,6 +40,17 @@ #include #endif +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wtautological-type-limit-compare" #pragma clang diagnostic ignored "-Wcovered-switch-default" diff --git a/ScreenGrab/ScreenGrab9.cpp b/ScreenGrab/ScreenGrab9.cpp index 1974d21..d43ddb7 100644 --- a/ScreenGrab/ScreenGrab9.cpp +++ b/ScreenGrab/ScreenGrab9.cpp @@ -29,6 +29,17 @@ #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wcovered-switch-default" #pragma clang diagnostic ignored "-Wswitch-enum" diff --git a/WICTextureLoader/WICTextureLoader11.cpp b/WICTextureLoader/WICTextureLoader11.cpp index 3e09d3f..6f6100a 100644 --- a/WICTextureLoader/WICTextureLoader11.cpp +++ b/WICTextureLoader/WICTextureLoader11.cpp @@ -40,18 +40,22 @@ #include #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wcovered-switch-default" #pragma clang diagnostic ignored "-Wswitch-enum" #endif -// Off by default warnings -#pragma warning(disable : 4619 4616 4623 4626 5027) -// C4619/4616 #pragma warning warnings -// C4623 default constructor was implicitly defined as deleted -// C4626 assignment operator was implicitly defined as deleted -// C5027 move assignment operator was implicitly defined as deleted - using namespace DirectX; using Microsoft::WRL::ComPtr; diff --git a/WICTextureLoader/WICTextureLoader12.cpp b/WICTextureLoader/WICTextureLoader12.cpp index 3d40f59..8a495b5 100644 --- a/WICTextureLoader/WICTextureLoader12.cpp +++ b/WICTextureLoader/WICTextureLoader12.cpp @@ -34,6 +34,17 @@ #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4062 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4062 enumerator 'x' in switch of enum 'y' is not handled +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wtautological-type-limit-compare" #pragma clang diagnostic ignored "-Wcovered-switch-default" @@ -42,13 +53,6 @@ #pragma clang diagnostic ignored "-Wunused-macros" #endif -// Off by default warnings -#pragma warning(disable : 4619 4616 4623 4626 5027) -// C4619/4616 #pragma warning warnings -// C4623 default constructor was implicitly defined as deleted -// C4626 assignment operator was implicitly defined as deleted -// C5027 move assignment operator was implicitly defined as deleted - #define D3DX12_NO_STATE_OBJECT_HELPERS #define D3DX12_NO_CHECK_FEATURE_SUPPORT_CLASS #include "d3dx12.h" diff --git a/WICTextureLoader/WICTextureLoader9.cpp b/WICTextureLoader/WICTextureLoader9.cpp index 3e563c7..bd5d61c 100644 --- a/WICTextureLoader/WICTextureLoader9.cpp +++ b/WICTextureLoader/WICTextureLoader9.cpp @@ -34,18 +34,21 @@ #include +#ifdef _MSC_VER +// Off by default warnings +#pragma warning(disable : 4619 4616 4061 4623 4626 5027) +// C4619/4616 #pragma warning warnings +// C4061 enumerator 'x' in switch of enum 'y' is not explicitly handled by a case label +// C4623 default constructor was implicitly defined as deleted +// C4626 assignment operator was implicitly defined as deleted +// C5027 move assignment operator was implicitly defined as deleted +#endif + #ifdef __clang__ #pragma clang diagnostic ignored "-Wcovered-switch-default" #pragma clang diagnostic ignored "-Wswitch-enum" #endif -// Off by default warnings -#pragma warning(disable : 4619 4616 4623 4626 5027) -// C4619/4616 #pragma warning warnings -// C4623 default constructor was implicitly defined as deleted -// C4626 assignment operator was implicitly defined as deleted -// C5027 move assignment operator was implicitly defined as deleted - using namespace DirectX; using Microsoft::WRL::ComPtr;