fixed some mingw warnings

This commit is contained in:
oy 2019-02-27 18:53:59 +01:00
parent bfee7275c7
commit 05fe3e2694

View file

@ -99,7 +99,7 @@ void dbg_msg(const char *sys, const char *fmt, ...)
msg = (char *)str + len;
va_start(args, fmt);
#if defined(CONF_FAMILY_WINDOWS)
#if defined(CONF_FAMILY_WINDOWS) && !defined(__GNUC__)
_vsprintf_p(msg, sizeof(str)-len, fmt, args);
#else
vsnprintf(msg, sizeof(str)-len, fmt, args);
@ -1771,7 +1771,7 @@ int str_length(const char *str)
void str_format(char *buffer, int buffer_size, const char *format, ...)
{
#if defined(CONF_FAMILY_WINDOWS)
#if defined(CONF_FAMILY_WINDOWS) && !defined(__GNUC__)
va_list ap;
va_start(ap, format);
_vsprintf_p(buffer, buffer_size, format, ap);
@ -2340,7 +2340,7 @@ void secure_random_fill(void *bytes, unsigned length)
#if defined(CONF_FAMILY_WINDOWS)
if(!CryptGenRandom(secure_random_data.provider, length, bytes))
{
dbg_msg("secure", "CryptGenRandom failed, last_error=%d", GetLastError());
dbg_msg("secure", "CryptGenRandom failed, last_error=%lu", GetLastError());
dbg_break();
}
#else