From 9f79dde2c804e943c2d6f7deaa00c6997b991691 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 16 Jan 2010 17:40:52 -0500 Subject: [PATCH] More pam warning cleanups - test_pam.c Clear up a few more warnings in the pam code. The changes here are very similar to the ones in the previous patch and use the same configure test: - use PAM_CONST to conditionally declare pam_message as const - cast a few arguments to putenv, which expects a non-const pointer Change-Id: I6c98623c35f4453f34c1d48b8b7d6ff1bfbc1e0c Reviewed-on: http://gerrit.openafs.org/1116 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/pam/test_pam.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pam/test_pam.c b/src/pam/test_pam.c index 7194804b93..5cee5a035c 100644 --- a/src/pam/test_pam.c +++ b/src/pam/test_pam.c @@ -18,7 +18,7 @@ #include -static int my_conv(int num_msg, struct pam_message **msg, +static int my_conv(int num_msg, PAM_CONST struct pam_message **msg, struct pam_response **response, void *appdata_ptr); @@ -97,8 +97,8 @@ main(int argc, char *argv[]) } pam_end(pamh, PAM_SUCCESS); - putenv(new_envstring); - putenv(new_homestring); + putenv((char *)new_envstring); + putenv((char *)new_homestring); chdir("/tmp"); printf("Type exit to back out.\n"); execl("/bin/csh", "/bin/csh", NULL); @@ -106,10 +106,10 @@ main(int argc, char *argv[]) static int -my_conv(int num_msg, struct pam_message **msg, struct pam_response **response, +my_conv(int num_msg, PAM_CONST struct pam_message **msg, struct pam_response **response, void *appdata_ptr) { - struct pam_message *m; + PAM_CONST struct pam_message *m; struct pam_response *r; char *p;