qt6-bb10/tests/auto
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
..
bic/data Add binary compatibility file for 6.7.0 2024-04-17 10:18:37 +00:00
cmake moc: add line number for class definition to JSON output 2024-08-03 07:04:04 +00:00
concurrent tst_QtConcurrentThreadEngine: fix UB (uninitialized boolean) 2024-07-06 10:17:50 +00:00
corelib Add __attribute__((format(printf()))) to q(v)nprintf() 2024-08-03 07:47:19 +00:00
dbus QDBusSignature: accept empty strings as valid 2024-05-10 13:17:20 -07:00
gui tests: skip tst_QWindow::framePositioning() on Wayland 2024-07-25 20:06:41 +00:00
guiapplauncher Convert "Color Editor Factory" Example to snippets 2024-04-19 13:39:41 +02:00
network Change type of variable qssl_dhparams_default_base64 2024-08-01 00:43:20 +00:00
opengl
other Fix accessibility of list views with underlying multi-column model 2024-06-26 22:52:30 +00:00
printsupport PDF: add support for PDF/X-4 2024-07-08 12:46:00 +00:00
shared Introduce flag to use typographical line metrics for fonts 2024-05-31 19:30:53 +02:00
sql SQL/QSqlRelationTableModel: don't crash with more than one relation 2024-07-22 21:00:12 +00:00
testlib tst_selftest: port away from qsnprintf() 2024-07-30 16:47:38 +00:00
tools moc: add line number for class definition to JSON output 2024-08-03 07:04:04 +00:00
wasm Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
widgets tst_QGraphicsGridLayout: port away from qsnprintf() 2024-08-01 00:43:07 +00:00
xml Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
CMakeLists.txt tst_QSettings: port to QTEST_THROW_ON_FAIL 2024-06-27 06:06:02 +00:00
network-settings.h Change license for tests files 2024-02-04 09:56:42 +01:00