From 9a70003b70687ff8da70830273fd28b7949c1b37 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 6 Jul 2024 19:45:08 +1000 Subject: [PATCH] MSBuild: Silence MSVC warning C4324 --- dep/msvc/vsprops/Base.props | 1 + src/core/cpu_code_cache_private.h | 9 --------- src/util/audio_stream.h | 8 -------- src/util/image.cpp | 1 - 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dep/msvc/vsprops/Base.props b/dep/msvc/vsprops/Base.props index 81efe34c4..fa05c047e 100644 --- a/dep/msvc/vsprops/Base.props +++ b/dep/msvc/vsprops/Base.props @@ -33,6 +33,7 @@ -msse4.1 %(AdditionalOptions) -flto=thin %(AdditionalOptions) + 4324;%(DisableSpecificWarnings) false diff --git a/src/core/cpu_code_cache_private.h b/src/core/cpu_code_cache_private.h index cd6dd9c8a..4a5e7f596 100644 --- a/src/core/cpu_code_cache_private.h +++ b/src/core/cpu_code_cache_private.h @@ -112,11 +112,6 @@ struct BlockMetadata BlockFlags flags; }; -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4324) // C4324: 'CPU::CodeCache::Block': structure was padded due to alignment specifier) -#endif - struct alignas(16) Block { u32 pc; @@ -167,10 +162,6 @@ struct alignas(16) Block ALWAYS_INLINE bool SpansPages() const { return StartPageIndex() != EndPageIndex(); } }; -#ifdef _MSC_VER -#pragma warning(pop) -#endif - using BlockLUTArray = std::array; struct LoadstoreBackpatchInfo diff --git a/src/util/audio_stream.h b/src/util/audio_stream.h index b2ef3af16..0d78c94fd 100644 --- a/src/util/audio_stream.h +++ b/src/util/audio_stream.h @@ -12,11 +12,6 @@ #include #include -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4324) // warning C4324: structure was padded due to alignment specifier -#endif - class Error; class SettingsInterface; @@ -380,6 +375,3 @@ void AudioStream::SampleReaderImpl(SampleType* dest, const SampleType* src, u32 } } -#ifdef _MSC_VER -#pragma warning(pop) -#endif diff --git a/src/util/image.cpp b/src/util/image.cpp index 7584008b4..8005461dd 100644 --- a/src/util/image.cpp +++ b/src/util/image.cpp @@ -19,7 +19,6 @@ // clang-format off #ifdef _MSC_VER #pragma warning(disable : 4611) // warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable -#pragma warning(disable : 4324) // warning C4324: '`anonymous-namespace'::JPEGErrorHandler': structure was padded due to alignment specifier #endif // clang-format on