Compilation errors found when compiled with -Werror=write-strings.
Explicit conversions from void * for memory allocation functions.
Explicit conversion to unsigned char *.