diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2021-06-30 13:43:58 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2021-07-08 01:49:26 +0200 |
commit | ebee8a13364f28c40fbe7fae4cedaebc70d9d024 (patch) | |
tree | e9532bcab6255c7ffa2a829f1e4e7c62b2c7a0f3 /tests/auto/tools/moc/tst_moc.cpp | |
parent | 28fbed2f5cfa311067ed42268302c15b99769876 (diff) |
QDBusMarshaller: fix -Wformat-overflow
Says GCC:
qdbusmarshaller.cpp: In member function ‘QDBusMarshaller* QDBusMarshaller::beginMap(QMetaType, QMetaType)’:
qdbusmarshaller.cpp:286:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
286 | qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
| ^
Fix by manual checking. It's a False Positive, because
QString::asprintf() can handle nullptr strings just find, but let's
make GCC happy.
Since the code snippet appears multiple times, even though GCC only
warns about one of them, take this opportunity to factor the code out
into a cold helper function.
Change-Id: I1d642f2465f34b670b179646185cba05cb16e573
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/tools/moc/tst_moc.cpp')
0 files changed, 0 insertions, 0 deletions