From 09747e064ed85578c3bd19873b4f0cb31ce7fd72 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 9 Apr 2025 11:14:46 -0700 Subject: [PATCH] tst_Q*Application: suppress warning about using read() with MSVC MSVC is pedantic that read() (a POSIX function) is not an ISO C function so insists that we use the underscored version. As if Microsoft followed that rule for their own APIs... Amends e6a6757c1485d09a4b7a124d67260f06d8022fef. Pick-to: 6.8 Change-Id: If51fd8564a3c415e1f7efffd7fde18a830c97e3b Reviewed-by: Fabian Kosmale (cherry picked from commit 9ffbeae50e768c37865ec08e7d8716b9fa75f575) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp b/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp index ec31c687b30..ce2360c569f 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/apphelper.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include +#include #include #include @@ -62,7 +63,7 @@ static int exitFromThread(int argc, char **argv) // block the GUI forever, otherwise the unloading of the QPA plugins // could cause a crash if something is running. char c; - int r = read(STDIN_FILENO, &c, 1); + int r = QT_READ(STDIN_FILENO, &c, 1); Q_UNUSED(r); }); app.exec();