fix Visual Studio warning, scan-build issue