Add casts to allow void * arguments.