diff --git a/DDSView/ddsview.cpp b/DDSView/ddsview.cpp index 1a17c1b..d8e6946 100644 --- a/DDSView/ddsview.cpp +++ b/DDSView/ddsview.cpp @@ -20,6 +20,8 @@ #include +#pragma warning(disable : 4619 4616 26812) + #include "DirectXTex.h" using namespace DirectX; diff --git a/DirectXTex/BC6HBC7.cpp b/DirectXTex/BC6HBC7.cpp index 4dc847f..e94cea7 100644 --- a/DirectXTex/BC6HBC7.cpp +++ b/DirectXTex/BC6HBC7.cpp @@ -3235,7 +3235,10 @@ void D3DX_BC7::EmitBlock(const EncodeParams* pEP, size_t uShape, size_t uRotatio _Use_decl_annotations_ void D3DX_BC7::FixEndpointPBits(const EncodeParams* pEP, const LDREndPntPair *pOrigEndpoints, LDREndPntPair *pFixedEndpoints) { + assert(pEP); const size_t uPartitions = ms_aInfo[pEP->uMode].uPartitions; + assert(uPartitions < BC7_MAX_REGIONS); + _Analysis_assume_(uPartitions < BC7_MAX_REGIONS); pFixedEndpoints[0] = pOrigEndpoints[0]; pFixedEndpoints[1] = pOrigEndpoints[1]; diff --git a/DirectXTex/DirectXTexP.h b/DirectXTex/DirectXTexP.h index f03bd51..cbaaaa2 100644 --- a/DirectXTex/DirectXTexP.h +++ b/DirectXTex/DirectXTexP.h @@ -12,7 +12,7 @@ #pragma once // Off by default warnings -#pragma warning(disable : 4619 4616 4061 4265 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4987 5026 5027 5031 5032 5039 5045) +#pragma warning(disable : 4619 4616 4061 4265 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4987 5026 5027 5031 5032 5039 5045 26812) // C4619/4616 #pragma warning warnings // C4061 enumerator 'X' in switch of enum 'X' is not explicitly handled by a case label // C4265 class has virtual functions, but destructor is not virtual @@ -34,6 +34,7 @@ // C5031/5032 push/pop mismatches in windows headers // C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc // C5045 Spectre mitigation warning +// 26812: The enum type 'x' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). // Windows 8.1 SDK related Off by default warnings #pragma warning(disable : 4471 4917 4986 5029) diff --git a/Texassemble/texassemble.cpp b/Texassemble/texassemble.cpp index 3166b6a..c1ab5b1 100644 --- a/Texassemble/texassemble.cpp +++ b/Texassemble/texassemble.cpp @@ -36,6 +36,8 @@ #include #include +#pragma warning(disable : 4619 4616 26812) + #include "DirectXTex.h" //Uncomment to add support for OpenEXR (.exr) diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index d13fc1b..7c4ebbc 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -35,6 +35,8 @@ #include +#pragma warning(disable : 4619 4616 26812) + #include "DirectXTex.h" #include "DirectXPackedVector.h" diff --git a/Texdiag/texdiag.cpp b/Texdiag/texdiag.cpp index e5a5a5f..06bfbf2 100644 --- a/Texdiag/texdiag.cpp +++ b/Texdiag/texdiag.cpp @@ -31,6 +31,8 @@ #include +#pragma warning(disable : 4619 4616 26812) + #include "DirectXTex.h" //Uncomment to add support for OpenEXR (.exr)