There is a function which takes a function pointer argument of the form void *(*func)(void *) and I am reading some code which calls it with the following argument (void *(*)(void *))(-1).
Is this just casting -1 to the correct function pointer type or is it something else? I am unsure of what it means.
Yes, that’s just a typecast. Without seeing the code in context, it’s not really possible to decide why someone might be doing that, though. It’s often convenient to use
cdeclto answer questions like this one: