diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-01-20 07:37:20 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-01-26 12:33:20 +0100 |
commit | 0a06c7d2f465d071b4b4430fe06a080da990143e (patch) | |
tree | 6ba396362a6271341b09b4e756df259e8a156325 /tests/auto | |
parent | 3548bb66e6bbe0f93b596b5571dda07073484b62 (diff) |
tst_QAspectJob: fix -Wsign-compare
std::vector::size_type is unsigned, while decltype(2) is signed.
Found by Clang 15:
qtestcase.h:585:34: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
return compare_helper(t1 == t2, "Compared values are not the same",
~~ ^ ~~
tst_qaspectjob.cpp:36:9: note: in instantiation of function template specialization 'QTest::qCompare<unsigned long, int>' requested here
QCOMPARE(job1->dependencies().size(), 2);
^
Make the RHS unsigned, too.
Amends b70f7af20550f55e9546ff5a2192f53d6ccb62cb.
Pick-to: 6.5 6.4 6.2
Change-Id: Ia7e612de97de86946c42c104081957fbdcc67d7f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/core/qaspectjob/tst_qaspectjob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp index a892e0932..9e8011acf 100644 --- a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp +++ b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp @@ -54,7 +54,7 @@ private Q_SLOTS: job1->removeDependency(job2); // THEN - QCOMPARE(job1->dependencies().size(), 1); + QCOMPARE(job1->dependencies().size(), 1U); QCOMPARE(job1->dependencies().at(0).lock(), job3); } @@ -73,7 +73,7 @@ private Q_SLOTS: job1->removeDependency(QWeakPointer<QAspectJob>()); // THEN - QCOMPARE(job1->dependencies().size(), 1); + QCOMPARE(job1->dependencies().size(), 1U); QCOMPARE(job1->dependencies().at(0).lock(), job3); } }; |