summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2023-01-30 17:34:40 +0100
committerDmitry V. Levin <ldv@strace.io>2023-01-30 16:34:40 +0000
commit4618442c50a89208520a5259aa5a9472b99bb3c7 (patch)
tree78c7a4757e1f5103fe1ccf49ed640621504bbdf2
parentb392552522524f6bac9c01d469f33e87971dbe0f (diff)
downloadlinux-pam-git-4618442c50a89208520a5259aa5a9472b99bb3c7.tar.gz
Enable additional compiler warnings
The current codebase should comply with those. * m4/warn_lang_flags.m4 (gl_WARN_ADD): Add -Winit-self, -Wnull-dereference, and -Wunused.
-rw-r--r--m4/warn_lang_flags.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/m4/warn_lang_flags.m4 b/m4/warn_lang_flags.m4
index 7c4871d6..9447b9ee 100644
--- a/m4/warn_lang_flags.m4
+++ b/m4/warn_lang_flags.m4
@@ -8,17 +8,20 @@ gl_WARN_ADD([-Wcast-align])
gl_WARN_ADD([-Wcast-align=strict])
gl_WARN_ADD([-Wcast-qual])
gl_WARN_ADD([-Wdeprecated])
+gl_WARN_ADD([-Winit-self])
gl_WARN_ADD([-Winline])
gl_WARN_ADD([-Wmain])
gl_WARN_ADD([-Wmissing-declarations])
gl_WARN_ADD([-Wmissing-format-attribute])
gl_WARN_ADD([-Wmissing-prototypes])
+gl_WARN_ADD([-Wnull-dereference])
gl_WARN_ADD([-Wp64])
gl_WARN_ADD([-Wpointer-arith])
gl_WARN_ADD([-Wreturn-type])
gl_WARN_ADD([-Wshadow])
gl_WARN_ADD([-Wstrict-prototypes])
gl_WARN_ADD([-Wuninitialized])
+gl_WARN_ADD([-Wunused])
gl_WARN_ADD([-Wwrite-strings])
AC_ARG_ENABLE([Werror],
[AS_HELP_STRING([--enable-Werror], [turn on -Werror compiler option])],