From 0c445f4a79d75ffe5456d05e2e12793d5891468d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Fri, 28 Apr 2023 23:54:33 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20build=20error=20error:=20compound=20assig?= =?UTF-8?q?nment=20with=20=E2=80=98volatile=E2=80=99-qualified=20left=20op?= =?UTF-8?q?erand=20is=20deprecated=20[-Werror=3Dvolatile]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/mathutiltest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/mathutiltest.cpp b/src/test/mathutiltest.cpp index ea856f8ef8c..eb3db2e383d 100644 --- a/src/test/mathutiltest.cpp +++ b/src/test/mathutiltest.cpp @@ -68,22 +68,22 @@ TEST_F(MathUtilTest, Denormal) { // and not by the pre-processor. In case of clang >= 15 the pre-processor flushes to // zero with -ffast-math enabled. volatile float fDenormal = std::numeric_limits::min(); - fDenormal /= 2.0f; + fDenormal = fDenormal / 2.0f; EXPECT_NE(0.0f, fDenormal); volatile double dDenormal = std::numeric_limits::min(); - dDenormal /= 2.0; + dDenormal = dDenormal / 2.0; EXPECT_NE(0.0, dDenormal); _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); fDenormal = std::numeric_limits::min(); - fDenormal /= 2.0f; + fDenormal = fDenormal / 2.0f; EXPECT_EQ(0.0f, fDenormal); dDenormal = std::numeric_limits::min(); - dDenormal /= 2.0; + dDenormal = dDenormal / 2.0; EXPECT_EQ(0.0, dDenormal); #endif