From 36623ba8c0072d813b16f5b63ad31646ebbb936f Mon Sep 17 00:00:00 2001 From: Jorge Pereira Date: Thu, 2 Nov 2023 14:21:17 -0300 Subject: [PATCH] Fix static warning message. eg: pam_radius_auth.c:1980:16: warning: no previous prototype for function 'pam_sm_acct_mgmt' [-Wmissing-prototypes] 1980 | PAM_EXTERN int pam_sm_acct_mgmt(UNUSED pam_handle_t *pamh, UNUSED int flags, UNUSED int argc, UNUSED CONST char **argv) 1 Fix warning assignment discards qualifiers | ^ pam_radius_auth.c:1980:12: note: declare 'static' if the function is not intended to be used outside of this translation unit 1980 | PAM_EXTERN int pam_sm_acct_mgmt(UNUSED pam_handle_t *pamh, UNUSED int flags, UNUSED int argc, UNUSED CONST char **argv) | ^ | static --- src/pam_radius_auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c index 09cd8d8..00cc0fd 100644 --- a/src/pam_radius_auth.c +++ b/src/pam_radius_auth.c @@ -1972,6 +1972,8 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, CONST c return retval; } +#ifdef PAM_STATIC + /* * Do nothing for account management. This is apparently needed by * some programs. @@ -1981,8 +1983,6 @@ PAM_EXTERN int pam_sm_acct_mgmt(UNUSED pam_handle_t *pamh, UNUSED int flags, UNU return PAM_SUCCESS; } -#ifdef PAM_STATIC - /* static module data */ struct pam_module _pam_radius_modstruct = { .name = "pam_radius_auth",