tst_QStorageInfo: port from qvsnprintf to std::vsnprintf()
Drive-by make a variable const. Pick-to: 6.8 Change-Id: I90231330d15edfdef8bc182ed917b80a4c413d2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
fba67959ac
commit
829caad5e7
@ -9,6 +9,8 @@
|
|||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include "private/qemulationdetector_p.h"
|
#include "private/qemulationdetector_p.h"
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
@ -71,7 +73,7 @@ static int qInfoPrinter(const char *format, ...)
|
|||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, format); // use variable arg list
|
va_start(ap, format); // use variable arg list
|
||||||
int n = qvsnprintf(buf + bufuse, sizeof(buf) - bufuse, format, ap);
|
const int n = std::vsnprintf(buf + bufuse, sizeof(buf) - bufuse, format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
bufuse += n;
|
bufuse += n;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user