From 829caad5e773245b7d712bce4b7e53e9377e3764 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 22 Jul 2024 15:06:57 +0200 Subject: [PATCH] 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 Reviewed-by: Ivan Solovev --- tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp index f96cd489004..08fe3a782d0 100644 --- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp +++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp @@ -9,6 +9,8 @@ #include #include "private/qemulationdetector_p.h" +#include + #include #ifdef Q_OS_WIN @@ -71,7 +73,7 @@ static int qInfoPrinter(const char *format, ...) va_list ap; 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); bufuse += n;