From c55139bfaabd3e5112486716f262936e85a2fb18 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 8 Jun 2021 11:43:55 +0200 Subject: tests/mock_*.c: Mark unused function arguments as such. This resolves: mock_pam.c: In function 'fake_conv': mock_pam.c:22:20: error: unused parameter 'num_msg' [-Werror=unused-parameter] 22 | int fake_conv (int num_msg, const struct pam_message **msg, | ~~~~^~~~~~~ mock_pam.c:23:39: error: unused parameter 'appdata_ptr' [-Werror=unused-parameter] 23 | struct pam_response **resp, void *appdata_ptr) | ~~~~~~^~~~~~~~~~~ mock_pam.c: In function 'fake_conv_empty_password': mock_pam.c:51:35: error: unused parameter 'num_msg' [-Werror=unused-parameter] 51 | int fake_conv_empty_password (int num_msg, const struct pam_message **msg, | ~~~~^~~~~~~ mock_pam.c:52:39: error: unused parameter 'appdata_ptr' [-Werror=unused-parameter] 52 | struct pam_response **resp, void *appdata_ptr) | ~~~~~~^~~~~~~~~~~ cc1: all warnings being treated as errors --- tests/mock_pam.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tests/mock_pam.c') diff --git a/tests/mock_pam.c b/tests/mock_pam.c index ce57973..e1b7324 100644 --- a/tests/mock_pam.c +++ b/tests/mock_pam.c @@ -19,8 +19,10 @@ struct pam_handle { /* note: the other fields have been omitted */ }; -int fake_conv (int num_msg, const struct pam_message **msg, - struct pam_response **resp, void *appdata_ptr) +int fake_conv (int __attribute__((unused)) num_msg, + const struct pam_message **msg, + struct pam_response **resp, + void __attribute__((unused)) *appdata_ptr) { struct pam_response *response = NULL; response = malloc (sizeof (struct pam_response)); @@ -48,8 +50,10 @@ int fake_conv (int num_msg, const struct pam_message **msg, return PAM_SUCCESS; } -int fake_conv_empty_password (int num_msg, const struct pam_message **msg, - struct pam_response **resp, void *appdata_ptr) +int fake_conv_empty_password (int __attribute__((unused)) num_msg, + const struct pam_message **msg, + struct pam_response **resp, + void __attribute__((unused)) *appdata_ptr) { struct pam_response *response = NULL; response = malloc (sizeof (struct pam_response)); -- cgit v1.2.3