changeset: 6408:282832c0329a user: Kevin McCarthy <[email protected]> date: Thu Jan 29 15:40:34 2015 -0800 link: http://dev.mutt.org/hg/mutt/rev/282832c0329a
Clean up sasl warnings. 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. diffs (33 lines): diff -r 73b97b986e0d -r 282832c0329a mutt_sasl.c --- a/mutt_sasl.c Tue Jan 27 16:15:31 2015 -0800 +++ b/mutt_sasl.c Thu Jan 29 15:40:34 2015 -0800 @@ -142,7 +142,7 @@ /* 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 @@ 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++;
