fix warnings, using (char*) casting