diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp index 54ef9be4f28..2fa584afa5a 100644 --- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp +++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp @@ -503,6 +503,9 @@ void tst_QtJson::testNumberComparisons() QJsonValue llMinPlus1(Q_INT64_C(-9223372036854775806)); QCOMPARE(llMin == llMinPlus1, Q_INT64_C(-9223372036854775807) == Q_INT64_C(-9223372036854775806)); // false +QT_WARNING_PUSH +// Android clang complains about implicit conversion from 'long long' to 'double' +QT_WARNING_DISABLE_CLANG("-Wimplicit-const-int-float-conversion") // The different storage formats should be able to compare as their C++ versions (all true) QCOMPARE(llMin == llMinDbl, Q_INT64_C(-9223372036854775807) == -9223372036854775807.0); QCOMPARE(llMinDbl == llMin, -9223372036854775807.0 == Q_INT64_C(-9223372036854775807)); @@ -510,6 +513,7 @@ void tst_QtJson::testNumberComparisons() QCOMPARE(llMinPlus1Dbl == llMinPlus1, -9223372036854775806.0 == Q_INT64_C(-9223372036854775806)); QCOMPARE(llMinPlus1 == llMinDbl, Q_INT64_C(-9223372036854775806) == -9223372036854775807.0); QCOMPARE(llMinPlus1Dbl == llMin, -9223372036854775806.0 == Q_INT64_C(-9223372036854775807)); +QT_WARNING_POP } void tst_QtJson::testObjectSimple() diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index 3c40aacda5d..5038c97d7f3 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -1652,12 +1652,16 @@ void tst_QString::asprintfS() // Check utf8 conversion for %s QCOMPARE(QString::asprintf("%s", "\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205"), QString::fromLatin1("\366\344\374\326\304\334\370\346\345\330\306\305")); +QT_WARNING_PUSH +// Android clang emits warning: '%n' specifier not supported on this platform +QT_WARNING_DISABLE_CLANG("-Wformat") int n1; QCOMPARE(QString::asprintf("%s%n%s", "hello", &n1, "goodbye"), u"hellogoodbye"); QCOMPARE(n1, 5); qlonglong n2; QCOMPARE(QString::asprintf("%s%s%lln%s", "foo", "bar", &n2, "whiz"), u"foobarwhiz"); QCOMPARE((int)n2, 6); +QT_WARNING_POP { // %ls @@ -1681,7 +1685,11 @@ void tst_QString::asprintfS() QLatin1String("\366\344\374\326\304\334\370\346\345\330\306\305")); int n; +QT_WARNING_PUSH +// Android clang emits warning: '%n' specifier not supported on this platform +QT_WARNING_DISABLE_CLANG("-Wformat") QCOMPARE(QString::asprintf("%ls%n%s", qUtf16Printable(u"hello"_s), &n, "goodbye"), "hellogoodbye"_L1); +QT_WARNING_POP QCOMPARE(n, 5); } } diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp index 4281d931799..ced9347e506 100644 --- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp +++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp @@ -409,6 +409,9 @@ void tst_QBitArray::operator_andeq() result &= detached(input1); COMPARE_BITARRAY_EQ(result, res); +QT_WARNING_PUSH +// Android clang emits warning: explicitly assigning value of variable of type 'QBitArray' to itself +QT_WARNING_DISABLE_CLANG("-Wself-assign-overloaded") // operation is idempotent result &= result; COMPARE_BITARRAY_EQ(result, res); @@ -416,6 +419,7 @@ void tst_QBitArray::operator_andeq() COMPARE_BITARRAY_EQ(result, res); result &= detached(result); COMPARE_BITARRAY_EQ(result, res); +QT_WARNING_POP } void tst_QBitArray::operator_and() @@ -515,6 +519,9 @@ void tst_QBitArray::operator_oreq() result |= detached(input1); COMPARE_BITARRAY_EQ(result, res); +QT_WARNING_PUSH +// Android clang emits warning: explicitly assigning value of variable of type 'QBitArray' to itself +QT_WARNING_DISABLE_CLANG("-Wself-assign-overloaded") // operation is idempotent result |= result; COMPARE_BITARRAY_EQ(result, res); @@ -522,6 +529,7 @@ void tst_QBitArray::operator_oreq() COMPARE_BITARRAY_EQ(result, res); result |= detached(result); COMPARE_BITARRAY_EQ(result, res); +QT_WARNING_POP } void tst_QBitArray::operator_or()