From 48573ddda3fad93a6f613412bad4cb1bf890fe98 Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Sat, 4 Jan 2025 18:27:10 +0100 Subject: [PATCH] Tests: avoid use of stderr as name for variables and objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On CYGWIN, I configured with -developer-build option and the build process fails at this point: qtbase/tests/auto/tools/moc/tst_moc.cpp: In member function ‘void tst_Moc::initTestCase()’: qtbase/tests/auto/tools/moc/tst_moc.cpp:940:9: error: expected primary-expression before ‘const’ 940 | const QByteArray stderr = p.readAllStandardError(); \ | ^~~~~ qtbase/tests/auto/tools/moc/tst_moc.cpp:941:25: error: request for member ‘isEmpty’ in ‘__getreent()->_reent::_stderr’, which is of pointer type ‘__FILE*’ (maybe you meant to use ‘->’ ?) 941 | QVERIFY2(stderr.isEmpty(), stderr.data()); \ | ^~~~~~~ It looks like that it doesn't like to use stderr word in that manner. Inside VERIFY_NO_ERRORS macro, I just renamed stderr to standardError and the problem was solved. Change-Id: I21e5a785b35db518efffccecf796b88c78ebc725 Reviewed-by: Thiago Macieira --- tests/auto/tools/moc/tst_moc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 09f7a9c75de..c46bcae7b23 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -936,8 +936,8 @@ private: #define VERIFY_NO_ERRORS(proc) do { \ auto &&p = proc; \ - const QByteArray stderr = p.readAllStandardError(); \ - QVERIFY2(stderr.isEmpty(), stderr.data()); \ + const QByteArray standardError = p.readAllStandardError(); \ + QVERIFY2(standardError.isEmpty(), standardError.data()); \ QCOMPARE(p.exitCode(), 0); \ } while (false)