diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-22 21:13:28 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-24 21:11:22 +0100 |
commit | 6f1821dfa302c028f7899e4485dfaf24a6a02457 (patch) | |
tree | e0fa45ab2c09574b85f5c590a0ba82def81091b4 /tests/benchmarks/corelib/io | |
parent | c00e443dcc5024aa1239ed2f494da13ab572d238 (diff) |
benchmarks: fix some (future) -Wunused-result warnings
Clang 10 warns about unused results of relational operators, which is
where this is coming from.
Fix by adding the usual prefix
[[maybe_unused]] auto r = ~~~;
to silence the warning. Do this elsewhere, too, since [[nodiscard]] is
slowly being rolled out across all our APIs. This is not a complete
sweep, though.
Not picking to 5.15, because this pattern doesn't work there and I
don't want to introduce a new one.
Pick-to: 6.3 6.2
Change-Id: I40dd8ad07496b686979dce533e044cbb486e30f3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib/io')
-rw-r--r-- | tests/benchmarks/corelib/io/qurl/tst_bench_qurl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/benchmarks/corelib/io/qurl/tst_bench_qurl.cpp b/tests/benchmarks/corelib/io/qurl/tst_bench_qurl.cpp index 8165f8d059..0ed155d221 100644 --- a/tests/benchmarks/corelib/io/qurl/tst_bench_qurl.cpp +++ b/tests/benchmarks/corelib/io/qurl/tst_bench_qurl.cpp @@ -188,7 +188,7 @@ void tst_QUrl::equality() QUrl url("pics/avatar.png"); QUrl url2("pics/avatar2.png"); QBENCHMARK { - url == url2; + [[maybe_unused]] auto r = url == url2; } } } |