Add maybe_unused in benchmark to guard against nodiscard in the future

Requested by Marc Mutz when adding the utc() benchmark.

Pick-to: 6.8 6.5 5.15
Change-Id: I6f97f9e4dab07d10718280b4fb7ac158e42b8d67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1f0bcec874dba8adbdf8de34e899565e89e80a38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Milian Wolff 2025-02-25 09:02:02 +01:00 committed by Qt Cherry-pick Bot
parent c4618d6020
commit cc6074c543

View File

@ -70,14 +70,14 @@ void tst_QTimeZone::isTimeZoneIdAvailable()
void tst_QTimeZone::systemTimeZone()
{
QBENCHMARK {
QTimeZone::systemTimeZone();
[[maybe_unused]] const auto r = QTimeZone::systemTimeZone();
}
}
void tst_QTimeZone::utc()
{
QBENCHMARK {
QTimeZone::utc();
[[maybe_unused]] const auto r = QTimeZone::utc();
}
}