From 32f68bef2ed3dbc733b06b61d0c74d0b62782518 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 10 Apr 2025 11:48:09 +0100 Subject: [PATCH] build: Enable -Wundef warning by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We prefer `#ifdef` to `#if` in code, so let’s use the `-Wundef` warning to enforce that. In CI, `-Werror` is enabled, so this should be enforcement enough. Suggested by Thomas Haller. Signed-off-by: Philip Withnall --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index b11151d28..119651471 100644 --- a/meson.build +++ b/meson.build @@ -579,6 +579,8 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wmissing-field-initializers', '-Wnonnull', '-Wnull-dereference', + # We prefer #ifdef to #if + '-Wundef', '-Wunused', # Due to maintained deprecated code, we do not want to see unused parameters '-Wno-unused-parameter',