]> granicus.if.org Git - neomutt/commitdiff
Clean up sasl warnings.
authorKevin McCarthy <kevin@8t8.us>
Thu, 29 Jan 2015 23:40:34 +0000 (15:40 -0800)
committerKevin McCarthy <kevin@8t8.us>
Thu, 29 Jan 2015 23:40:34 +0000 (15:40 -0800)
These were caused by assigning callback functions to the
sasl_callback_t.proc member.  The callback type doesn't list any
parameters, because parameters vary by callback.  The fix was simply
assigning a cast.

Cyrus-sasl2 has a sasl_callback_ft typedef that their sample code uses
for this purpose, but it is in a different header, saslplug.h, and
isn't in their 1.5 tree.  Since this is probably not portable to other
implementations, I just added an equivalent cast.

mutt_sasl.c

index c568ecac893428b3e1d419199f30d420c6e9f449..7d7388c48c3e4733632184815efdc08a88fc7987 100644 (file)
@@ -142,7 +142,7 @@ int mutt_sasl_start (void)
 
   /* set up default logging callback */
   callbacks[0].id = SASL_CB_LOG;
-  callbacks[0].proc = mutt_sasl_cb_log;
+  callbacks[0].proc = (int (*)(void))mutt_sasl_cb_log;
   callbacks[0].context = NULL;
 
   callbacks[1].id = SASL_CB_LIST_END;
@@ -270,17 +270,17 @@ sasl_callback_t* mutt_sasl_get_callbacks (ACCOUNT* account)
   callback = mutt_sasl_callbacks;
 
   callback->id = SASL_CB_USER;
-  callback->proc = mutt_sasl_cb_authname;
+  callback->proc = (int (*)(void))mutt_sasl_cb_authname;
   callback->context = account;
   callback++;
 
   callback->id = SASL_CB_AUTHNAME;
-  callback->proc = mutt_sasl_cb_authname;
+  callback->proc = (int (*)(void))mutt_sasl_cb_authname;
   callback->context = account;
   callback++;
 
   callback->id = SASL_CB_PASS;
-  callback->proc = mutt_sasl_cb_pass;
+  callback->proc = (int (*)(void))mutt_sasl_cb_pass;
   callback->context = account;
   callback++;