diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 15bc2649174..40d42a662b1 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -2504,7 +2504,7 @@ void tst_Moc::cxx11Enums() QCOMPARE(size_t(metaType.sizeOf()), sizeof(char)); QCOMPARE(isUnsigned, !std::is_signed_v); } else if (isScoped) { - QCOMPARE(metaType.sizeOf(), sizeof(int)); + QCOMPARE(size_t(metaType.sizeOf()), sizeof(int)); QCOMPARE(isUnsigned, !std::is_signed_v); } else { // underlying type is implementation defined