diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-12 22:11:05 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-12 22:11:05 -0400 |
commit | 4164abd9f708a24d997483bb8fd8558979ed328e (patch) | |
tree | 7ebff152de6489ec49288a016e896250c5913bc6 | |
parent | b0990aa8e28ce6c57ce927d5cf9278f278bda8d2 (diff) | |
download | gtk+-4164abd9f708a24d997483bb8fd8558979ed328e.tar.gz |
build: Quiet the compiler
Don't use -Wnull-dereference when assertions are
disabled, since that causes the compiler to see
NULL everywhere.
-rw-r--r-- | meson.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 7223431ddf..eb012b549e 100644 --- a/meson.build +++ b/meson.build @@ -270,7 +270,6 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wmissing-include-dirs', '-Wmissing-noreturn', '-Wnested-externs', - '-Wnull-dereference', '-Wold-style-definition', '-Wpointer-arith', '-Wshadow', @@ -304,6 +303,10 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' if cc.get_id() == 'gcc' test_cflags += ['-Wcast-align'] # This warns too much on clang endif + + if not gtk_debug_cflags.contains('-DG_DISABLE_ASSERT') + test_cflags += ['-Wnull-dereference'] # Too noisy when assertions are disabled + endif else test_cflags = [] endif |