Hi Ralf,
From: Ralf Wildenhues
This rather mechanical patch fixes one half of the issue of mixing
pointers to data and pointers to functions, by changing the set of
callback functions to using two pointers to void and one pointer to
a function type (since we only need one function signature, there
is no problem with just using that; otherwise, we could still cast
between different function types).
Since we now have even more unused arguments, I decided to add a
macro
LT__UNUSED to make GCC emit less warnings, and used that throughout
libltdl.
OK to apply? Tested on GNU/Linux, where libltdl now passes
make CFLAGS='-W -Wall -Werror'
for me. (But I'm fixing this now only because it will make my next
bugfix easier.)
Looks good to me. I suppose an alternative would have been
declaring a union of an object and function pointer, and using that
union as the parameter in the callbacks, to avoid the number of
unused parameters, but I think your approach is a little cleaner.