From 07f7ed2badf0cc1972bf6ba15f4c0cde4a773f19 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 31 Mar 2023 23:08:53 +0200 Subject: [PATCH] Fix warning when comparing size_t with qsizetype Change-Id: Id8e7ae20aea99f2acb03b665484615bf7f932873 Reviewed-by: Fabian Kosmale --- tests/auto/tools/moc/tst_moc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 6a2962d609e..15bc2649174 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -2501,7 +2501,7 @@ void tst_Moc::cxx11Enums() const QMetaType metaType = metaEnum.metaType(); const bool isUnsigned = metaType.flags() & QMetaType::IsUnsignedEnumeration; if (isTyped) { - QCOMPARE(metaType.sizeOf(), sizeof(char)); + QCOMPARE(size_t(metaType.sizeOf()), sizeof(char)); QCOMPARE(isUnsigned, !std::is_signed_v); } else if (isScoped) { QCOMPARE(metaType.sizeOf(), sizeof(int));