mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
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));
This commit is contained in:
parent
ac81e71f78
commit
998c382037
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user