From 3024ca2146cfdae2e7fb231e8d180dfc81e1a74e Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 2 Feb 2023 16:53:08 -0800 Subject: Suppress memcpy writing to an object with no trivial copy-assignment warnings We need to copy padding in most of these cases, and the objects are trivially copyable; however, BitField prevents trivial copy-assignment. --- Source/Core/VideoCommon/CPMemory.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Source/Core/VideoCommon/CPMemory.cpp') diff --git a/Source/Core/VideoCommon/CPMemory.cpp b/Source/Core/VideoCommon/CPMemory.cpp index d2371834a3..3d72a6f70b 100644 --- a/Source/Core/VideoCommon/CPMemory.cpp +++ b/Source/Core/VideoCommon/CPMemory.cpp @@ -17,7 +17,14 @@ CPState g_preprocess_cp_state; void CopyPreprocessCPStateFromMain() { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclass-memaccess" +#endif std::memcpy(&g_preprocess_cp_state, &g_main_cp_state, sizeof(CPState)); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } std::pair GetCPRegInfo(u8 cmd, u32 value) -- cgit v1.2.3