Fix MSVC /W4 warnings

Another fix for MSVC /W4 warnings about constant conditionals and unreachable code. Doesn't address int64 issue to keep the patch small and simple.