some fixes to silence cl.exe compiler warnings on windows