mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
build: Quiet the compiler
Don't use -Wnull-dereference when assertions are disabled, since that causes the compiler to see NULL everywhere.
This commit is contained in:
parent
b0990aa8e2
commit
4164abd9f7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user