summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-03-20 13:30:39 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-03-24 13:23:16 +0100
commit1fe5ea3f836c3962a5919a48b46275545e008cf6 (patch)
tree90ae2603d7c8e0abb9f68235d339843b21ffe08f /tests/auto/corelib/tools
parentc0dbc02680b693bf487770db9c3ad05d10ef6040 (diff)
Fix compiler warnings in tests
Don't mix unsigned and signed types in comparisons. Pick-to: 6.3 Change-Id: Ia4ba9c114177425a21cadc8cafe8179928315a5d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 9ed1ce67aa..fac4ac7007 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -595,7 +595,7 @@ void tst_QHash::erase_edge_case()
for (qsizetype i = 0; i < numBuckets * 4 && index < 2; ++i) {
const size_t hash = qHash(i, QHashSeed::globalSeed());
const size_t bucketForHash = QHashPrivate::GrowthPolicy::bucketForHash(numBuckets, hash);
- if (bucketForHash == numBuckets - 1)
+ if (qsizetype(bucketForHash) == numBuckets - 1)
keys[index++] = i;
}
QCOMPARE(index, 2); // Sanity check. If this fails then the test needs an update!