From 4ff6ecbeff758e649e0b6bfd6e74b0cc0a270f92 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 18 Nov 2022 13:33:20 +0000 Subject: [PATCH] build: Move -Wnonnull flag to meson.build It should be enabled in all builds, not just CI builds. Otherwise developers might miss it locally. This updates commit f11b96f255ee69f7ea5c51a2596f5cf1909a32b9. Signed-off-by: Philip Withnall --- .gitlab-ci.yml | 4 +--- meson.build | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c88998045..36e86de73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,7 +91,7 @@ fedora-x86_64: stage: build needs: [] variables: - CFLAGS: "-coverage -ftest-coverage -fprofile-arcs -Wnonnull" + CFLAGS: "-coverage -ftest-coverage -fprofile-arcs" script: - meson ${MESON_COMMON_OPTIONS} --werror @@ -139,8 +139,6 @@ debian-stable-x86_64: image: $DEBIAN_IMAGE stage: build needs: [] - variables: - CFLAGS: "-Wnonnull" script: - meson ${MESON_COMMON_OPTIONS} --werror diff --git a/meson.build b/meson.build index 0edea24a9..30a65e873 100644 --- a/meson.build +++ b/meson.build @@ -477,6 +477,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wduplicated-branches', '-Wimplicit-fallthrough', '-Wmisleading-indentation', + '-Wnonnull', '-Wunused', # Due to maintained deprecated code, we do not want to see unused parameters '-Wno-unused-parameter',