From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:44:54 +0000 (+0300) Subject: macro: Add DISABLE_WARNING_STRINGOP_OVERREAD X-Git-Tag: v257-rc1~248^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cefa196723fd5dd29c2acf194e25b579b0ef12a0;p=thirdparty%2Fsystemd.git macro: Add DISABLE_WARNING_STRINGOP_OVERREAD While at it, also add -Wunknown-warning-option to basic_disabled_warnings to fix compilation with clang --- diff --git a/meson.build b/meson.build index caed1d75f0a..922e5d5a9b7 100644 --- a/meson.build +++ b/meson.build @@ -367,6 +367,7 @@ endif # avoid them. basic_disabled_warnings = [ '-Wno-missing-field-initializers', + '-Wno-unknown-warning-option', '-Wno-unused-parameter', '-Wno-nonnull-compare', ] diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h index 7b797323262..7e604b8283b 100644 --- a/src/fundamental/macro-fundamental.h +++ b/src/fundamental/macro-fundamental.h @@ -32,6 +32,10 @@ _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\"")