Fix the remaining /W4 C4510 and C4610 warnings.
Fix int to CHAR warning.
Fix the /W4 C4701 warnings: using potentially uninitialized local variable.