Compile fix for MSVC 14

Also fixes some new variable shadowing warnings
in cmdline_test with Visual C++ 14.