mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
fixed some mingw warnings
This commit is contained in:
parent
bfee7275c7
commit
05fe3e2694
|
@ -99,7 +99,7 @@ void dbg_msg(const char *sys, const char *fmt, ...)
|
||||||
msg = (char *)str + len;
|
msg = (char *)str + len;
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
#if defined(CONF_FAMILY_WINDOWS)
|
#if defined(CONF_FAMILY_WINDOWS) && !defined(__GNUC__)
|
||||||
_vsprintf_p(msg, sizeof(str)-len, fmt, args);
|
_vsprintf_p(msg, sizeof(str)-len, fmt, args);
|
||||||
#else
|
#else
|
||||||
vsnprintf(msg, sizeof(str)-len, fmt, args);
|
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, ...)
|
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_list ap;
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
_vsprintf_p(buffer, buffer_size, format, ap);
|
_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 defined(CONF_FAMILY_WINDOWS)
|
||||||
if(!CryptGenRandom(secure_random_data.provider, length, bytes))
|
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();
|
dbg_break();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue