> How is that a bad thing?
Because casting suppresses a much more serious error you would otherwise get if you failed to include stdlib.h in the first place.
Since C quietly converts the void* returned by malloc into the char* of the assigned pointer, the cast at best does nothing.
If you're getting complaints about void* conversions, then stop using C++ to compile your code, or start using new/delete for memory management.
--