Fix uninitialized variable and add some char * casts.