From a6b1c557dc662d3ab2e34df90aa5c901096d8291 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 21 Apr 2022 21:31:43 -0700 Subject: [PATCH] Another warning suppression for VS 2022 17.2 --- DirectXTex/DirectXTexP.h | 3 ++- DirectXTex/DirectXTexUtil.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DirectXTex/DirectXTexP.h b/DirectXTex/DirectXTexP.h index 928190f..146d8c7 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 5219 26812) +#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 5219 5246 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 @@ -35,6 +35,7 @@ // C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc // C5045 Spectre mitigation warning // C5219 implicit conversion from 'int' to 'float', possible loss of data +// C5246 the initialization of a subobject should be wrapped in braces // 26812: The enum type 'x' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). // Windows 8.1 SDK related Off by default warnings diff --git a/DirectXTex/DirectXTexUtil.cpp b/DirectXTex/DirectXTexUtil.cpp index af66c6a..a399851 100644 --- a/DirectXTex/DirectXTexUtil.cpp +++ b/DirectXTex/DirectXTexUtil.cpp @@ -270,9 +270,11 @@ REFGUID DirectX::GetWICCodec(WICCodecs codec) noexcept case WIC_CODEC_ICO: return GUID_ContainerFormatIco; +#ifdef NTDDI_WIN10_RS4 case WIC_CODEC_HEIF: // This requires installing https://aka.ms/heif return GUID_ContainerFormatHeif; +#endif default: return GUID_NULL;