[PATCH] Fix incompatible function pointer types in cyrus-sasl module

Florian Weimer <[email protected]>
Newsgroups org.kernel.vger.autofs
Message-ID <[email protected]>
Add casts to SASL callbacks to avoid incompatible-pointer-types
errors.  Avoids a build failure with stricter compilers.

diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c
index e742eaf8ebe6ce8a..78b77942ba3efd56 100644
--- a/modules/cyrus-sasl.c
+++ b/modules/cyrus-sasl.c
@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **);
 static int getuser_func(void *, int, const char **, unsigned *);
 
 static sasl_callback_t callbacks[] = {
-	{ SASL_CB_USER, &getuser_func, NULL },
-	{ SASL_CB_AUTHNAME, &getuser_func, NULL },
-	{ SASL_CB_PASS, &getpass_func, NULL },
+	{ SASL_CB_USER, (int(*)(void)) &getuser_func, NULL },
+	{ SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL },
+	{ SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL },
 	{ SASL_CB_LIST_END, NULL, NULL },
 };
 
 static sasl_callback_t debug_callbacks[] = {
-	{ SASL_CB_LOG, &sasl_log_func, NULL },
-	{ SASL_CB_USER, &getuser_func, NULL },
-	{ SASL_CB_AUTHNAME, &getuser_func, NULL },
-	{ SASL_CB_PASS, &getpass_func, NULL },
+	{ SASL_CB_LOG, (int(*)(void)) &sasl_log_func, NULL },
+	{ SASL_CB_USER, (int(*)(void)) &getuser_func, NULL },
+	{ SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL },
+	{ SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL },
 	{ SASL_CB_LIST_END, NULL, NULL },
 };
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.