diff options
author | Benjamin Otte <otte@redhat.com> | 2021-11-04 00:27:27 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-01-06 19:46:58 -0500 |
commit | 998c382037780cfa13ee4b8e16de801bf6939615 (patch) | |
tree | 572cc323ea59d51288daa1301779b022d774f8ff /meson.build | |
parent | ac81e71f789d95bf070403418cb5d44103f31987 (diff) | |
download | gtk+-998c382037780cfa13ee4b8e16de801bf6939615.tar.gz |
build: Turn off tautological-constant-out-of-range-compare warning
This issues a warning when an enum value is compared to a value that is
out of range for the enum.
We do this a lot, either when using -1 for undefined values or when
comparing array sizes to enum values like so:
enum {
ONE,
TWO,
THREE
} some_enum_value;
const char *names= { "one", "two", "three" };
g_assert (some_enum_value < G_N_ELEMENTS (names));
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 4282f2701c..e1d4653884 100644 --- a/meson.build +++ b/meson.build @@ -271,6 +271,7 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wno-c++11-extensions', '-Wno-missing-include-dirs', '-Wno-typedef-redefinition', + '-Wno-tautological-constant-out-of-range-compare', '-Wduplicated-branches', '-Wduplicated-cond', '-Wformat=2', |