From 2d94e12fba2c48b67da1ad7f42e3cfc42db6ecec Mon Sep 17 00:00:00 2001 From: collecting Date: Tue, 7 Oct 2025 10:10:06 +0000 Subject: [PATCH] fix: Clang Compilation Warnings --- patches/discord-rpc-wclass-memaccess-fix.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/discord-rpc-wclass-memaccess-fix.patch b/patches/discord-rpc-wclass-memaccess-fix.patch index e640611cf..0cbd2eae9 100644 --- a/patches/discord-rpc-wclass-memaccess-fix.patch +++ b/patches/discord-rpc-wclass-memaccess-fix.patch @@ -7,10 +7,11 @@ index 5dad9e9..972183d 100644 add_subdirectory(src) + -+# Suppress the -Wclass-memaccess warning from modern GCC/Clang in rapidjson. -+# This warning flags intentional, performance-oriented code in the library. -+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ++# Suppress memcpy warnings from modern GCC/Clang in rapidjson. ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(discord-rpc PRIVATE "-Wno-class-memaccess") ++elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") ++ target_compile_options(discord-rpc PRIVATE "-Wno-nontrivial-memcall") +endif() + if (BUILD_EXAMPLES)