Silence warnings from unused variables

Use them, or replace them with existing constants.

Pick-to: 6.5
Change-Id: I808028296305e15b68aecb1f961ba6a85b8e9cc7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-03-04 11:20:36 +01:00
parent 617165af6b
commit 643b6e5b29
4 changed files with 5 additions and 2 deletions

View File

@ -88,6 +88,7 @@ void EventsBench::noEvent()
QBENCHMARK {
val += tst.foo(1);
}
QVERIFY(val > 0);
}
void EventsBench::sendEvent_data()

View File

@ -64,6 +64,7 @@ void tst_QThreadStorage::get()
int *i = ts.localData();
count += *i;
}
QVERIFY(count > 0);
ts.setLocalData(0);
}

View File

@ -10,4 +10,5 @@ qt_internal_add_benchmark(tst_bench_qdatetime
tst_bench_qdatetime.cpp
LIBRARIES
Qt::Test
Qt::CorePrivate
)

View File

@ -6,6 +6,7 @@
#include <QTest>
#include <QList>
#include <qdebug.h>
#include <QtCore/private/qdatetime_p.h>
class tst_QDateTime : public QObject
{
@ -67,8 +68,7 @@ private Q_SLOTS:
void fromMSecsSinceEpochTz();
};
constexpr qint64 SECS_PER_DAY = 86400;
constexpr qint64 MSECS_PER_DAY = 86400000;
using namespace QtPrivate::DateTimeConstants;
constexpr qint64 JULIAN_DAY_1 = 1721426;
constexpr qint64 JULIAN_DAY_11 = 1725078;
constexpr qint64 JULIAN_DAY_1890 = 2411369;