diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-03-05 19:33:12 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-03-05 19:33:12 +0000 |
commit | 9569de568a7eeaf91e2134ee3e1dd00978882903 (patch) | |
tree | 81cf7bc64c36e492284d7d9a7fc9c4faf54e7016 /modules/pam_unix/support.c | |
parent | 33ebc5de87a9fdf88977494bf42e1a6ac24fb68a (diff) | |
download | pam-9569de568a7eeaf91e2134ee3e1dd00978882903.tar.gz pam-9569de568a7eeaf91e2134ee3e1dd00978882903.tar.bz2 pam-9569de568a7eeaf91e2134ee3e1dd00978882903.zip |
pam_unix: fix --disable-nis compilation warnings
When the build is configured using --disable-nis option, gcc complains:
pam_unix_passwd.c: In function '_do_setpass':
pam_unix_passwd.c:398:8: warning: unused variable 'master' [-Wunused-variable]
support.c: In function '_unix_getpwnam':
support.c:305:21: warning: parameter 'nis' set but not used [-Wunused-but-set-parameter]
* modules/pam_unix/pam_unix_passwd.c (_do_setpass): Move the definition
of "master" variable to [HAVE_NIS].
* modules/pam_unix/support.c (_unix_getpwnam) [!(HAVE_YP_GET_DEFAULT_DOMAIN
&& HAVE_YP_BIND && HAVE_YP_MATCH && HAVE_YP_UNBIND)]: Do not assign
the unused parameter but mark it as used.
Diffstat (limited to 'modules/pam_unix/support.c')
-rw-r--r-- | modules/pam_unix/support.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index 6a840a26..a04211cd 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -351,7 +351,7 @@ int _unix_getpwnam(pam_handle_t *pamh, const char *name, } #else /* we don't have NIS support, make compiler happy. */ - nis = 0; + (void) nis; #endif if (matched && (ret != NULL)) { |