qt6-bb10/tests/auto/corelib/text
Marc Mutz 42c467a11d Add __attribute__((format(printf()))) to q(v)nprintf()
They were lacking it since the start of the public history, and
porting to std::snprintf() (which has the warning) as part of making
Qt compile with QT_NO_SNPRINTF has turned up surprisingly many
-Wformat warnings, so enable the warning for the remaining (non-tree)
users.

Backporting aggressively, as this might unearth security bugs in user
code.

[ChangeLog][QtCore][q(v)snprintf] Added attributes for GCC-compatible
compilers to detect format/argument mismatches. If this throws warnings
for your calls now, don't ignore them. printf() format mistakes could
be security-relevant. You may also find that you relied on undocumented
behavior, such as that certain implementations (Windows, Android, WASM)
of qsnprintf() support char16_t* instead of wchar_t* for %ls. In that
case, you should port to qUtf16Printable() and QString::asprintf(), or
suppress the warning and port away from the platform dependence at your
earliest convenience.

Task-number: QTBUG-127110
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I5c1fd9b2d5d2d55c68773f33edfd76acacd2408c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
(cherry picked from commit 64416d3cf645187385d8ad90bc44d9c8e9ce864f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-03 07:47:19 +00:00
..
qanystringview QAnyStringView: check QASV(char) isn't UTF-8 2024-07-17 16:26:27 +00:00
qbytearray Add __attribute__((format(printf()))) to q(v)nprintf() 2024-08-03 07:47:19 +00:00
qbytearray_large Change license for tests files 2024-02-04 09:56:42 +01:00
qbytearrayapisymmetry Blacklist tests requiring parsing text > 255 chars on VxWorks 2024-06-26 22:52:30 +00:00
qbytearraylist Change license for tests files 2024-02-04 09:56:42 +01:00
qbytearraymatcher Change license for tests files 2024-02-04 09:56:42 +01:00
qbytearrayview tst_QByteArrayView: (re)fix GCC ubsan build 2024-05-23 01:36:54 +02:00
qbytedatabuffer Change license for tests files 2024-02-04 09:56:42 +01:00
qchar Tests: check the output of QFile::open 2024-03-27 04:24:11 +01:00
qcollator Change license for tests files 2024-02-04 09:56:42 +01:00
qlatin1stringmatcher QStaticLatin1StringMatcher: add indexIn(QStringView) 2024-05-08 22:05:35 +02:00
qlatin1stringview Change license for tests files 2024-02-04 09:56:42 +01:00
qlocale Update CLDR to v45, adding language Kuvi 2024-07-17 12:57:30 +02:00
qregularexpression tst_QRegularExpression: port to QTEST_THROW_ON_FAIL 2024-06-19 23:32:05 +00:00
qstring Tests: disable various compiler warnings 2024-07-12 00:48:40 +00:00
qstring_no_cast_from_bytearray Change license for tests files 2024-02-04 09:56:42 +01:00
qstringapisymmetry tst_QStringApiSymmetry: add tests for unary arg() calls 2024-05-29 14:24:30 +02:00
qstringbuilder tst_QStringBuilder: add more checks 2024-06-12 12:23:43 +00:00
qstringconverter tst_QStringConverter: compare pointer distances, not pointers 2024-06-07 06:59:22 +00:00
qstringiterator Change license for tests files 2024-02-04 09:56:42 +01:00
qstringlist Change license for tests files 2024-02-04 09:56:42 +01:00
qstringmatcher Change license for tests files 2024-02-04 09:56:42 +01:00
qstringtokenizer Change license for tests files 2024-02-04 09:56:42 +01:00
qstringview tst_QStringView: (re)fix GCC ubsan build 2024-05-23 01:36:55 +02:00
qtextboundaryfinder Tests: check the output of QFile::open 2024-03-27 04:24:11 +01:00
qunicodetools Change license for tests files 2024-02-04 09:56:42 +01:00
shared Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt tst_QRegularExpression: port to QTEST_THROW_ON_FAIL 2024-06-19 23:32:05 +00:00