[patch] compiler warning in saslauthd/auth_pam.c

Matt Selsky selsky at columbia.edu
Wed Dec 11 19:14:39 EST 2002


This fixed a compiler warning while building auth_pam.c on Solaris 9.

gcc -DHAVE_CONFIG_H -DSASLAUTHD_CONF_FILE_DEFAULT=\"/opt/cyrus-sasl-2.1.10/etc/saslauthd.conf\" -I. -I../../../src/saslauthd -I.. -I../../../src/saslauthd/include    -g -O2 -c ../../../src/saslauthd/auth_pam.c
../../../src/saslauthd/auth_pam.c: In function `auth_pam':
../../../src/saslauthd/auth_pam.c:196: warning: assignment from incompatible pointer type


$ diff -u auth_pam.c.orig auth_pam.c
--- auth_pam.c.orig Wed Dec 11 16:04:30 2002
+++ auth_pam.c  Wed Dec 11 18:53:18 2002
@@ -78,7 +78,7 @@
 saslauthd_pam_conv (
   /* PARAMETERS */
   int num_msg,                         /* I: number of messages */
-  const struct pam_message **msg,      /* I: pointer to array of messages */
+  struct pam_message **msg,            /* I: pointer to array of messages */
   struct pam_response **resp,          /* O: pointer to pointer of response */
   void *appdata_ptr                    /* I: pointer to app specific data */
   /* END PARAMETERS */

I see on Linux that struct pam_conv's member conv is declared with the 
2nd argument const.  Solaris doesn't declare the argument const.




More information about the Info-cyrus mailing list