I have found that in some corners of the code some calls to standard C functions are decorated with casts to (void *) for no reason, and this code pattern then gets copied around. I have gone through and cleaned this up a bit, in the attached patches.