Add casts to (void*) for the benefit of GCC.