mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
build: Enable -Wnull-dereference warning
This enables `NULL` pointer dereference checking in the compiler. This isn’t as good as static analysis, but it should hopefully catch some simple errors without too high a false positive rate. If the false positive rate is too high to be useful, we can always disable it again. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
@@ -549,6 +549,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
||||
'-Wmisleading-indentation',
|
||||
'-Wmissing-field-initializers',
|
||||
'-Wnonnull',
|
||||
'-Wnull-dereference',
|
||||
'-Wunused',
|
||||
# Due to maintained deprecated code, we do not want to see unused parameters
|
||||
'-Wno-unused-parameter',
|
||||
|
Reference in New Issue
Block a user