[glib: 2/3] build: Always enable -Wmisleading-indentation
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] build: Always enable -Wmisleading-indentation
- Date: Wed, 30 May 2018 09:34:57 +0000 (UTC)
commit 61b2f5c8e11aa5ae38138f352334f389f2b1d058
Author: Philip Withnall <withnall endlessm com>
Date: Wed May 30 10:12:01 2018 +0100
build: Always enable -Wmisleading-indentation
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 <withnall endlessm com>
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',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]