diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-28 18:13:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-28 18:13:52 +0000 |
commit | a45fd13259bf169fd38914b6a277b20baa322e7d (patch) | |
tree | 1b32c4d5d515c19c086fb0829fa0acfabe628c67 | |
parent | e004ed02665d37f209fdca30ebe3d6b799ea20f4 (diff) | |
download | src-a45fd13259bf169fd38914b6a277b20baa322e7d.tar.gz src-a45fd13259bf169fd38914b6a277b20baa322e7d.zip |
Apply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):
Silence all remaining qual-cast warnings except in the test suite.
Notes
Notes:
svn path=/projects/clang360-import/; revision=277840
-rw-r--r-- | contrib/openpam/CREDITS | 1 | ||||
-rw-r--r-- | contrib/openpam/configure.ac | 2 | ||||
-rw-r--r-- | contrib/openpam/lib/libpam/openpam_dispatch.c | 2 | ||||
-rw-r--r-- | contrib/openpam/modules/pam_unix/pam_unix.c | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index a2fc7d3407e8..c14f7ea3ff9e 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -21,6 +21,7 @@ ideas: Christos Zoulas <christos@netbsd.org> Daniel Richard G. <skunk@iskunk.org> Darren J. Moffat <darren.moffat@sun.com> + Dimitry Andric <dim@freebsd.org> Dmitry V. Levin <ldv@altlinux.org> Don Lewis <truckman@freebsd.org> Emmanuel Dreyfus <manu@netbsd.org> diff --git a/contrib/openpam/configure.ac b/contrib/openpam/configure.ac index 1412b7a8e30b..bf7f905cdcd8 100644 --- a/contrib/openpam/configure.ac +++ b/contrib/openpam/configure.ac @@ -110,7 +110,7 @@ AC_SUBST(CRYPTO_LIBS) AC_ARG_ENABLE([developer-warnings], AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]), - [CFLAGS="${CFLAGS} -Wall -Wextra"]) + [CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual"]) AC_ARG_ENABLE([debugging-symbols], AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]), [CFLAGS="${CFLAGS} -O0 -g -fno-inline"]) diff --git a/contrib/openpam/lib/libpam/openpam_dispatch.c b/contrib/openpam/lib/libpam/openpam_dispatch.c index 5fa068f8e261..0cff63184850 100644 --- a/contrib/openpam/lib/libpam/openpam_dispatch.c +++ b/contrib/openpam/lib/libpam/openpam_dispatch.c @@ -117,7 +117,7 @@ openpam_dispatch(pam_handle_t *pamh, openpam_log(PAM_LOG_LIBDEBUG, "calling %s() in %s", pam_sm_func_name[primitive], chain->module->path); r = (chain->module->func[primitive])(pamh, flags, - chain->optc, (const char **)chain->optv); + chain->optc, (const char **)(intptr_t)chain->optv); pamh->current = NULL; openpam_log(PAM_LOG_LIBDEBUG, "%s: %s(): %s", chain->module->path, pam_sm_func_name[primitive], diff --git a/contrib/openpam/modules/pam_unix/pam_unix.c b/contrib/openpam/modules/pam_unix/pam_unix.c index ad7dd1b3a77a..f76651d084d8 100644 --- a/contrib/openpam/modules/pam_unix/pam_unix.c +++ b/contrib/openpam/modules/pam_unix/pam_unix.c @@ -74,7 +74,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, #endif struct passwd *pwd; const char *user; - char *crypt_password, *password; + const char *crypt_password, *password; int pam_err, retry; (void)argc; @@ -98,7 +98,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, for (retry = 0; retry < 3; ++retry) { #ifdef OPENPAM pam_err = pam_get_authtok(pamh, PAM_AUTHTOK, - (const char **)&password, NULL); + &password, NULL); #else resp = NULL; pam_err = (*conv->conv)(1, &msgp, &resp, conv->appdata_ptr); |