build: Turn off tautological-constant-out-of-range-compare warning
authorBenjamin Otte <otte@redhat.com>
Wed, 3 Nov 2021 23:27:27 +0000 (00:27 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Jan 2023 00:46:58 +0000 (19:46 -0500)
commit998c382037780cfa13ee4b8e16de801bf6939615
tree572cc323ea59d51288daa1301779b022d774f8ff
parentac81e71f789d95bf070403418cb5d44103f31987
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));
meson.build