Apply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):

Silence all remaining qual-cast warnings except in the test suite.
This commit is contained in:
Dimitry Andric 2015-01-28 18:13:52 +00:00
parent e004ed0266
commit a45fd13259
4 changed files with 5 additions and 4 deletions

View File

@ -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>

View File

@ -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"])

View File

@ -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],

View File

@ -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);