diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-01 10:36:41 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-10-25 08:00:00 +0000 |
commit | b303486bf1b812dd99f48a7bbb81838d658f7e03 (patch) | |
tree | a87b5097bc6fd3824ce4c159c2244bdd3a63bd39 /m4 | |
parent | ef9983f9d45d42f5d8adaf59592517092586ec73 (diff) | |
download | pam-b303486bf1b812dd99f48a7bbb81838d658f7e03.tar.gz pam-b303486bf1b812dd99f48a7bbb81838d658f7e03.tar.bz2 pam-b303486bf1b812dd99f48a7bbb81838d658f7e03.zip |
Add missing format function attributes and enable -Wmissing-format-attribute
Exported functions already have these attributes, add them to other functions.
This enables compilers to find format specifier mismatches, like:
foo_print("Hello %d", "world")
* m4/warn_lang_flags.m4 (gl_WARN_ADD): Add -Wmissing-format-attribute.
* conf/pam_conv1/Makefile.am (AM_CFLAGS): Add -I$(top_srcdir)/libpam/include.
* conf/pam_conv1/pam_conv_y.y: Include <security/_pam_types.h>.
(yyerror): Add printf format attribute.
* modules/pam_pwhistory/opasswd.c (helper_log_err): Likewise.
* modules/pam_rootok/pam_rootok.c (log_callback): Likewise.
* modules/pam_tally/pam_tally.c (tally_log): Likewise.
* modules/pam_tally2/pam_tally2.c (tally_log): Likewise.
* modules/pam_unix/passverify.c (helper_log_err): Likewise.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/warn_lang_flags.m4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/m4/warn_lang_flags.m4 b/m4/warn_lang_flags.m4 index 740194f0..7c4871d6 100644 --- a/m4/warn_lang_flags.m4 +++ b/m4/warn_lang_flags.m4 @@ -11,6 +11,7 @@ gl_WARN_ADD([-Wdeprecated]) 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([-Wp64]) gl_WARN_ADD([-Wpointer-arith]) |