use mingw's vsnprintf
fix warnings