summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/moc/tst_moc.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-06-30 13:43:58 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-07-08 01:49:26 +0200
commitebee8a13364f28c40fbe7fae4cedaebc70d9d024 (patch)
treee9532bcab6255c7ffa2a829f1e4e7c62b2c7a0f3 /tests/auto/tools/moc/tst_moc.cpp
parent28fbed2f5cfa311067ed42268302c15b99769876 (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