From 1977b778f008abc2172d7c58240edc1586b49601 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 19 Oct 2023 10:11:03 -0700 Subject: [PATCH] tst_QHashFunctions: suppress warning about casting from float to _Float16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends c86cf385d6d66d8fd3de1666205aaf4b8fcec747. tst_qhashfunctions.cpp:109:59: warning: converting to ‘qfloat16::NativeType’ {aka ‘_Float16’} from ‘float’ with greater conversion rank Change-Id: I79e700614d034281bf55fffd178f91775966658f Reviewed-by: Marc Mutz (cherry picked from commit a61d7529511c890aa595110b9320ea0bf53dd623) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 74b93a3410f5511c5b5b56b6183936aefd250e56) --- tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp index 8618a03d142..39f9cdae810 100644 --- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp +++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp @@ -106,7 +106,7 @@ void tst_QHashFunctions::consistent() // floats { - const/*expr broken: QTBUG-116079*/ qfloat16 f16 = -42.f; + const/*expr broken: QTBUG-116079*/ qfloat16 f16 = qfloat16(-42.f); const auto h16 = qHash(f16, seed); const auto h32 = qHash(float(f16), seed); const auto h64 = qHash(double(f16), seed);