--- locking/locking.o --- cc-1140 c99: WARNING File = locking/locking.c, Line = 1277 A value of type "void *" cannot be used to initialize an entity of type "void (*)(struct share_mode_entry *, const char *, const char *)". void (*traverse_callback)(struct share_mode_entry *, const char *, const char *) = state; ^
from brlock.c: BRLOCK_FN(traverse_callback) = (BRLOCK_FN_CAST())state; #define BRLOCK_FN_CAST() \ void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \ enum brl_type lock_type, \ enum brl_flavour lock_flav, \ br_off start, br_off size) #define BRLOCK_FN(fn) \ void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \ enum brl_type lock_type, \ enum brl_flavour lock_flav, \ br_off start, br_off size)
I extrapolated that to (in include/smb.h): #define LOCKING_FN_CAST() \ void (*)(struct share_mode_entry *, const char *, const char *) #define LOCKING_FN(fn) \ void (*fn)(struct share_mode_entry *, const char *, const char *) and changed the assignment to, LOCKING_FN(traverse_callback) = (LOCKING_FN_CAST())state;
Applied that fix - thanks a lot ! Jeremy.