summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2025-11-27 07:24:33 +0100
committerMarc Mutz <[email protected]>2025-11-28 17:59:40 +0100
commite584f9f36e7f10a331d22670a0641601b48d2956 (patch)
tree71c106911b5bb6121fa1f7c49f2eae32a8ea0d14
parent949bebaec69d908ca842e8ef7d3e3800d8c2f7b5 (diff)
tst_q23_expected: fix GCC -Wformat-zero-length
GCC warns if a format string is statically known to be empty. Since we mark up printf-style QTest::addRow() using the resp. attribute, GCC warns here, too: tst_q23_expected.cpp:23:19: warning: zero-length gnu_printf format string [-Wformat-zero-length] 23 | QTest::addRow("") << false; | ^~ Instead of using the old newRow(), add some content to the data tag instead. It cannot be left unmentioned that this test doesn't test ... very much. I hope we don't use this component in production code, yet... Amends 4e9f4d5d02e29b4522540b8f9b9b01b7e57a6b54. Pick-to: 6.10 Change-Id: I50ebb074997e034506c6602ff7602ad392b745be Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Tim Blechmann <[email protected]>
-rw-r--r--tests/auto/corelib/global/q23/expected/tst_q23_expected.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/q23/expected/tst_q23_expected.cpp b/tests/auto/corelib/global/q23/expected/tst_q23_expected.cpp
index 6de836da9d0..92df31d1a75 100644
--- a/tests/auto/corelib/global/q23/expected/tst_q23_expected.cpp
+++ b/tests/auto/corelib/global/q23/expected/tst_q23_expected.cpp
@@ -20,7 +20,7 @@ private Q_SLOTS:
void tst_q23_expected::value_throw_exception_unreachable_data()
{
QTest::addColumn<bool>("unexpected");
- QTest::addRow("") << false;
+ QTest::addRow("expected") << false;
}
void tst_q23_expected::value_throw_exception_unreachable()