summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2021-03-29 10:16:01 +0200
committerAndreas Buhr <andreas.buhr@qt.io>2021-03-29 16:06:25 +0200
commitdfe86d0150da443e807d66f4f945fec001929666 (patch)
treeee78ca4d7bfcf78df783ad9335109dba901e4ed7 /tests/benchmarks/corelib
parent5925daf969c8f271458ca81e49f0e675a4c5c912 (diff)
Fix some warnings
Change-Id: I546300b4e630a2234c83c03ece65a08f4c8652d2 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp3
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp8
-rw-r--r--tests/benchmarks/corelib/tools/qcryptographichash/main.cpp18
-rw-r--r--tests/benchmarks/corelib/tools/qrect/main.cpp8
4 files changed, 28 insertions, 9 deletions
diff --git a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
index 3e7f520b76..0bc0a7de93 100644
--- a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
@@ -115,6 +115,7 @@ void tst_bench_QUuid::fromRfc4122()
QByteArray string = QByteArray::fromHex("67C8770B44F1410AAB9AF9B5446F13EE");
QBENCHMARK {
QUuid uuid = QUuid::fromRfc4122(string);
+ Q_UNUSED(uuid)
}
}
@@ -124,6 +125,7 @@ void tst_bench_QUuid::createUuidV3()
QByteArray name = QByteArray("Test");
QBENCHMARK {
QUuid uuid = QUuid::createUuidV3(ns, name);
+ Q_UNUSED(uuid)
}
}
@@ -133,6 +135,7 @@ void tst_bench_QUuid::createUuidV5()
QByteArray name = QByteArray("Test");
QBENCHMARK {
QUuid uuid = QUuid::createUuidV5(ns, name);
+ Q_UNUSED(uuid)
}
}
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index 98716e83a9..1bb1a02a24 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -55,7 +55,7 @@ T * f(T *ts) // dummy function to prevent code from being optimized away by the
template<typename T>
class UseCases_QList : public UseCases<T>
{
- void insert(int size)
+ void insert(int size) override
{
QList<T> v;
T t{};
@@ -65,7 +65,7 @@ class UseCases_QList : public UseCases<T>
}
}
- void lookup(int size)
+ void lookup(int size) override
{
QList<T> v;
@@ -87,7 +87,7 @@ class UseCases_QList : public UseCases<T>
template <typename T>
class UseCases_stdvector : public UseCases<T>
{
- void insert(int size)
+ void insert(int size) override
{
std::vector<T> v;
T t;
@@ -97,7 +97,7 @@ class UseCases_stdvector : public UseCases<T>
}
}
- void lookup(int size)
+ void lookup(int size) override
{
std::vector<T> v;
diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp b/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp
index 792132cc47..1f0a7373bb 100644
--- a/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp
+++ b/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp
@@ -88,9 +88,25 @@ const char *algoname(int i)
return "keccak_384-";
case QCryptographicHash::Keccak_512:
return "keccak_512-";
+ case QCryptographicHash::Blake2b_160:
+ return "blake2b_160-";
+ case QCryptographicHash::Blake2b_256:
+ return "blake2b_256-";
+ case QCryptographicHash::Blake2b_384:
+ return "blake2b_384-";
+ case QCryptographicHash::Blake2b_512:
+ return "blake2b_512-";
+ case QCryptographicHash::Blake2s_128:
+ return "blake2s_128-";
+ case QCryptographicHash::Blake2s_160:
+ return "blake2s_160-";
+ case QCryptographicHash::Blake2s_224:
+ return "blake2s_224-";
+ case QCryptographicHash::Blake2s_256:
+ return "blake2s_256-";
}
Q_UNREACHABLE();
- return 0;
+ return nullptr;
}
tst_bench_QCryptographicHash::tst_bench_QCryptographicHash()
diff --git a/tests/benchmarks/corelib/tools/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp
index 485e0290f8..7ddf17845c 100644
--- a/tests/benchmarks/corelib/tools/qrect/main.cpp
+++ b/tests/benchmarks/corelib/tools/qrect/main.cpp
@@ -221,7 +221,7 @@ void tst_qrect::intersected()
QRect r1(rf1.toRect());
QRect r2(rf2.toRect());
QBENCHMARK {
- r1.intersected(r2);
+ Q_UNUSED(r1.intersected(r2))
}
}
@@ -237,7 +237,7 @@ void tst_qrect::united()
QRect r1(rf1.toRect());
QRect r2(rf2.toRect());
QBENCHMARK {
- r1.united(r2);
+ Q_UNUSED(r1.united(r2))
}
}
@@ -293,7 +293,7 @@ void tst_qrect::intersected_f()
QFETCH(QRectF, rf1);
QFETCH(QRectF, rf2);
QBENCHMARK {
- rf1.intersected(rf2);
+ Q_UNUSED(rf1.intersected(rf2))
}
}
@@ -307,7 +307,7 @@ void tst_qrect::united_f()
QFETCH(QRectF, rf1);
QFETCH(QRectF, rf2);
QBENCHMARK {
- rf1.united(rf2);
+ Q_UNUSED(rf1.united(rf2))
}
}