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