va_list ap;
#ifdef Q_OS_WIN32
va_start(ap, fmt);
+# ifdef Q_CC_GNU
+ vsnprintf(str, sizeof(str), fmt, ap);
+# else
_vsnprintf_s(str, sizeof(str), _TRUNCATE, fmt, ap);
+# endif
va_end(ap);
#else
::va_start(ap, fmt);
- if (::vasprintf(&str, fmt, ap)); // IF is needed to avoid the compiler warning
+ if (::vasprintf(&str, fmt, ap)) {}; // IF is needed to avoid the compiler warning
::va_end(ap);
#endif