]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
macro: Add DISABLE_WARNING_STRINGOP_OVERREAD
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>
Fri, 11 Oct 2024 13:44:54 +0000 (16:44 +0300)
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>
Fri, 11 Oct 2024 20:07:44 +0000 (23:07 +0300)
While at it, also add -Wunknown-warning-option to basic_disabled_warnings to fix compilation with clang

meson.build
src/fundamental/macro-fundamental.h

index caed1d75f0a2538c21cdbabdb856692c60dbe036..922e5d5a9b73763e6f0c13ea58652a74580ec97d 100644 (file)
@@ -367,6 +367,7 @@ endif
 # avoid them.
 basic_disabled_warnings = [
         '-Wno-missing-field-initializers',
+        '-Wno-unknown-warning-option',
         '-Wno-unused-parameter',
         '-Wno-nonnull-compare',
 ]
index 7b7973232626e592d5c3b7f66bc1574ba17f9ae0..7e604b8283b59e83399d576a67e2e8dcdc1e39ee 100644 (file)
         _Pragma("GCC diagnostic push");                                 \
         _Pragma("GCC diagnostic ignored \"-Wshadow\"")
 
+#define DISABLE_WARNING_STRINGOP_OVERREAD                               \
+        _Pragma("GCC diagnostic push");                                 \
+        _Pragma("GCC diagnostic ignored \"-Wstringop-overread\"")
+
 #define DISABLE_WARNING_INCOMPATIBLE_POINTER_TYPES                      \
         _Pragma("GCC diagnostic push");                                 \
         _Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types\"")