diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-03-22 08:57:34 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-03-24 09:51:21 +0100 |
commit | d2d42d45a71b6ae10d0c7459dcb69a7e7d6295b9 (patch) | |
tree | bdcbb0b879b0e3e9855943962b9684df75387031 /tests | |
parent | a746058521402653004888340ef162de7e252fe8 (diff) |
tst_bench_QCryptographicHash: swallow result() return values
As usual, assign them to a [[maybe_unused]] variable, to avoid
potential future [[nodiscard]] problems, and to indicate to
readers of the code that there's a result that's being returned,
we're just not interested in it.
Change-Id: I2bd47ca98418092ca885d50a1a6417a21a612a85
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 25c5452c260b2e5033a3f7519f85f61eaa053632)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/benchmarks/corelib/tools/qcryptographichash/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp b/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp index 6bbf39019b..6593bca057 100644 --- a/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp +++ b/tests/benchmarks/corelib/tools/qcryptographichash/main.cpp @@ -105,7 +105,8 @@ void tst_bench_QCryptographicHash::hash() QFETCH(QByteArray, data); QBENCHMARK { - QCryptographicHash::hash(data, algo); + [[maybe_unused]] + auto r = QCryptographicHash::hash(data, algo); } } @@ -118,7 +119,8 @@ void tst_bench_QCryptographicHash::addData() QBENCHMARK { hash.reset(); hash.addData(data); - hash.result(); + [[maybe_unused]] + auto r = hash.result(); } } @@ -136,7 +138,8 @@ void tst_bench_QCryptographicHash::addDataChunked() hash.addData(data.constData() + 64 * i, 64); hash.addData(data.constData() + data.size() / 64 * 64, data.size() % 64); - hash.result(); + [[maybe_unused]] + auto r = hash.result(); } } |