Fixed some warnings on VisualStudio2010

This commit is contained in:
Mathieu Labbé
2015-04-01 10:38:59 -04:00
parent 6089a44589
commit 37c34e8186
10 changed files with 27 additions and 23 deletions

View File

@@ -172,7 +172,7 @@ std::string uBytes2Hex(const char * bytes, unsigned int bytesLen)
std::vector<char> uHex2Bytes(const std::string & hex)
{
return uHex2Bytes(&hex[0], hex.length());
return uHex2Bytes(&hex[0], (int)hex.length());
}
std::vector<char> uHex2Bytes(const char * hex, int hexLen)
@@ -287,7 +287,11 @@ std::string uFormatv (const char *fmt, va_list args)
#endif
// Try to vsnprintf into our buffer.
#ifdef _MSC_VER
int needed = vsnprintf_s(buf, size, size, fmt, argsTmp);
#else
int needed = vsnprintf (buf, size, fmt, argsTmp);
#endif
va_end(argsTmp);
// NB. C99 (which modern Linux and OS X follow) says vsnprintf
// failure returns the length it would have needed. But older