diff options
author | Marc Mutz <marc.mutz@qt.io> | 2024-05-16 18:08:30 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-05-18 19:45:16 +0200 |
commit | f6c03e330ebbc039a1d243806331ba0e6eaee3a0 (patch) | |
tree | c76c871ce71aa8967b7ef68cd812a345017ec8c4 /tests/auto | |
parent | 88fd047a911bc89faf991407a334f3a505e3600c (diff) |
tst_qv4estable: fix -Wsign-compare
QV4::ESTable::{m_capacity,m_size} are uints, so compare against 8U,
too.
Amends d3e36454830012e4fd4c538ddeab7cddbfacdc24.
Task-number: QTBUG-123999
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I1b2a4ca27d0d7a4637461178cc14aadf18399fb1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qv4estable/tst_qv4estable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qv4estable/tst_qv4estable.cpp b/tests/auto/qml/qv4estable/tst_qv4estable.cpp index 45df62b23e..7d137ae7d2 100644 --- a/tests/auto/qml/qv4estable/tst_qv4estable.cpp +++ b/tests/auto/qml/qv4estable/tst_qv4estable.cpp @@ -18,7 +18,7 @@ void tst_qv4estable::checkRemoveAvoidsHeapBufferOverflow() QV4::ESTable estable; // Fill the ESTable with values so it is at max capacity. - QCOMPARE_EQ(estable.m_capacity, 8); + QCOMPARE_EQ(estable.m_capacity, 8U); for (uint i = 0; i < estable.m_capacity; ++i) { estable.set(QV4::Value::fromUInt32(i), QV4::Value::fromUInt32(i)); } @@ -27,8 +27,8 @@ void tst_qv4estable::checkRemoveAvoidsHeapBufferOverflow() for (uint i = 0; i < estable.m_capacity; ++i) { QVERIFY(estable.m_keys[i].sameValueZero(QV4::Value::fromUInt32(i))); } - QCOMPARE_EQ(estable.m_capacity, 8); - QCOMPARE_EQ(estable.m_size, 8); + QCOMPARE_EQ(estable.m_capacity, 8U); + QCOMPARE_EQ(estable.m_size, 8U); // Remove the first item from the set to verify that asan does not trip. // Relies on the CI platform propagating asan flag to all tests. |