https://bugzilla.suse.com/show_bug.cgi?id=1221682 https://bugzilla.suse.com/show_bug.cgi?id=1221682#c5 --- Comment #5 from Michal Jireš <michal.jires@suse.com> ---
I wonder whether the sasl_callback_t.proc entry could get away with an unnamed union covering all argument cases for a valid @id?
Quickly looking at cyrus-sasl's saslplug.h, *unnamed* union would not be enough: 36 typedef int (*sasl_callback_ft)(void); 37 typedef int sasl_getcallback_t(sasl_conn_t *conn, 38 unsigned long callbackid, 39 sasl_callback_ft * pproc, 40 void **pcontext);
As mentioned in comment#1 , I think the cyrus-sasl callback interface deserves to be tracked as a separate bug. @Michal: if you agree, could you raise a ticket? I think this can be closed once cyrus-sasl is tracked elsewhere.
I don't see a problem with the sasl_callback_t interface (at least not more than with void* ). Maybe using: void (*proc)(void); could be slightly preferable. At least it suppresses warnings and makes it a bit clearer that it is a generic function pointer. I am not convinced that using union would improve type-safety by much. So I would leave it as it is. Sorry for the delay. -- You are receiving this mail because: You are on the CC list for the bug.