[gtk/testsuite-asserts: 13/13] build: Quiet the compiler
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/testsuite-asserts: 13/13] build: Quiet the compiler
- Date: Tue, 13 Apr 2021 02:12:08 +0000 (UTC)
commit 4164abd9f708a24d997483bb8fd8558979ed328e
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 12 22:11:05 2021 -0400
build: Quiet the compiler
Don't use -Wnull-dereference when assertions are
disabled, since that causes the compiler to see
NULL everywhere.
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]