From 61b2f5c8e11aa5ae38138f352334f389f2b1d058 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 30 May 2018 10:12:01 +0100 Subject: [PATCH] build: Always enable -Wmisleading-indentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Try and ensure that people don’t push code with misleading indentation in future. This should give fairly few false positives. Signed-off-by: Philip Withnall --- configure.ac | 2 +- meson.build | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ab67bda3f..be48c9a19 100644 --- a/configure.ac +++ b/configure.ac @@ -3508,7 +3508,7 @@ AC_ARG_ENABLE(compile-warnings, enable_compile_warnings=yes) AS_IF([test "x$enable_compile_warnings" != xno], [ CC_CHECK_FLAGS_APPEND([GLIB_WARN_CFLAGS], [CFLAGS], [\ - -Wall -Wstrict-prototypes -Wduplicated-branches \ + -Wall -Wstrict-prototypes -Wduplicated-branches -Wmisleading-indentation \ -Werror=declaration-after-statement \ -Werror=missing-prototypes -Werror=implicit-function-declaration \ -Werror=pointer-arith -Werror=init-self -Werror=format-security \ diff --git a/meson.build b/meson.build index 49cc9c3bd..6eb67cff2 100644 --- a/meson.build +++ b/meson.build @@ -331,6 +331,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' test_c_args = [ '-Wall', '-Wduplicated-branches', + '-Wmisleading-indentation', '-Wstrict-prototypes', '-Wunused', '-Werror=declaration-after-statement',