Add maybe_unused in benchmark to guard against nodiscard in the future

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

Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I6f97f9e4dab07d10718280b4fb7ac158e42b8d67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Milian Wolff 2025-02-25 09:02:02 +01:00
parent 29c7beac2e
commit 1f0bcec874

View File

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