Clean up some MSVC and PVS-Studio nitpicky warnings