What | Removed | Added |
---|---|---|
Assignee | kernel-fs@suse.de | ddiss@suse.com |
Thanks for the report... (In reply to Michal Jireš from comment #0) > Building autofs with GCC 14 fails here: > https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging: > Gcc7/autofs/standard/x86_64 > > Due to (exhaustive list of errors): > > cyrus-sasl.c:112:25: error: initialization of ‘int (*)(void)’ from > incompatible pointer type ‘int (*)(void *, int, const char **, unsigned int > *)’ [-Wincompatible-pointer-types] > 112 | { SASL_CB_USER, &getuser_func, NULL }, ... This appears to be due to the somewhat confusing sasl_callback_t interface provided via cyrus-sasl's sasl.h: 350 /* 351 * Extensible type for a client/server callbacks 352 * id -- identifies callback type 353 * proc -- procedure call arguments vary based on id 354 * context -- context passed to procedure 355 */ 356 /* Note that any memory that is allocated by the callback needs to be 357 * freed by the application, be it via function call or interaction. 358 * 359 * It may be freed after sasl_*_step returns SASL_OK. if the mechanism 360 * requires this information to persist (for a security layer, for example) 361 * it must maintain a private copy. 362 */ 363 typedef struct sasl_callback { 364 /* Identifies the type of the callback function. 365 * Mechanisms must ignore callbacks with id's they don't recognize. 366 */ 367 unsigned long id; 368 int (*proc)(void); /* Callback function. Types of arguments vary by 'id' */ 369 void *context; 370 } sasl_callback_t; So the @proc function pointer's arguments are *supposed* to vary based on id, but it's declared parameter list is (void). I wonder whether the sasl_callback_t.proc entry could get away with an unnamed union covering all argument cases for a valid @id?