From cefa196723fd5dd29c2acf194e25b579b0ef12a0 Mon Sep 17 00:00:00 2001 From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:44:54 +0300 Subject: [PATCH] macro: Add DISABLE_WARNING_STRINGOP_OVERREAD While at it, also add -Wunknown-warning-option to basic_disabled_warnings to fix compilation with clang --- meson.build | 1 + src/fundamental/macro-fundamental.h | 4 ++++ 2 files changed, 5 insertions(+) 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\"")