From 8252476fc8c8bdcacbea41f886f085746df9016a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 8 Jun 2021 11:49:03 +0200 Subject: tests/mock_*.c: Mark unused function arguments as such. This resolves: mock_pam.c: In function 'fake_conv': mock_pam.c:24:20: error: unused parameter 'num_msg' [-Werror=unused-parameter] 24 | int fake_conv (int num_msg, const struct pam_message **msg, | ~~~~^~~~~~~ mock_pam.c:25:39: error: unused parameter 'appdata_ptr' [-Werror=unused-parameter] 25 | struct pam_response **resp, void *appdata_ptr) | ~~~~~~^~~~~~~~~~~ cc1: all warnings being treated as errors --- tests/mock_pam.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/mock_pam.c') diff --git a/tests/mock_pam.c b/tests/mock_pam.c index 9111092..10f2d80 100644 --- a/tests/mock_pam.c +++ b/tests/mock_pam.c @@ -21,8 +21,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)); -- cgit v1.2.3