From c8dbebd410d7643b3577ce786e6634635106f877 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 28 Jul 2024 08:00:00 +0000 Subject: pam_faillock: silence compilation warning Since audit_log_acct_message() was decorated with warn_unused_result attribute, compilation of faillock helper produces the following diagnostics: main.c: In function 'do_user': main.c:250:25: warning: ignoring return value of 'audit_log_acct_message' declared with attribute 'warn_unused_result' [-Wunused-result] Given that this helper has never been picky about audit, e.g. audit_open() errors do not affect its exit status, just silence this new warning. * modules/pam_faillock/main.c [HAVE_LIBAUDIT] (do_user): Silence compilation warning. --- modules/pam_faillock/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/pam_faillock') diff --git a/modules/pam_faillock/main.c b/modules/pam_faillock/main.c index 136be834..57989ba6 100644 --- a/modules/pam_faillock/main.c +++ b/modules/pam_faillock/main.c @@ -247,7 +247,8 @@ do_user(struct options *opts, const char *user) #ifdef HAVE_LIBAUDIT } if ((audit_fd=audit_open()) >= 0) { - audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL, + (void) !audit_log_acct_message(audit_fd, + AUDIT_USER_MGMT, NULL, "faillock-reset", user, pwd != NULL ? pwd->pw_uid : AUDIT_NO_ID, NULL, NULL, NULL, rv == 0); -- cgit v1.2.3