Skip to content

Commit

Permalink
Fix static warning message.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jpereira committed Nov 2, 2023
1 parent 7d75a31 commit 36623ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pam_radius_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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",
Expand Down

0 comments on commit 36623ba

Please sign in to comment.