https://bugzilla.suse.com/show_bug.cgi?id=1221682 https://bugzilla.suse.com/show_bug.cgi?id=1221682#c6 --- Comment #6 from David Disseldorp <ddiss@suse.com> --- (In reply to Michal Jireš from comment #5)
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.
The callback API types have a different number of arguments passed. As-is it would appear that it's easy to have a mismatch between caller and callee function parameters... Couldn't that lead callback functions to access caller-uninitialized registers, if the caller passed fewer parameters than expected? Anyhow, I'm also okay with leaving it as is if that's your preference. This can be closed once https://build.opensuse.org/request/show/1160083 is merged. -- You are receiving this mail because: You are on the CC list for the bug.