From: Marc Dionne Date: Sat, 16 Jan 2010 22:40:52 +0000 (-0500) Subject: More pam warning cleanups - test_pam.c X-Git-Tag: openafs-devel-1_5_69~6 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9f79dde2c804e943c2d6f7deaa00c6997b991691;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/pam/test_pam.c b/src/pam/test_pam.c index 7194804b9..5cee5a035 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;