summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2022-08-29 14:58:50 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2022-09-07 13:15:27 +0000
commit070446d5ebf2a82531160268fbae0bb7c6730ecd (patch)
treeb1cb26ad7d0c465b5f3a73594fb6b8c90995ea9b /tests/auto/corelib
parent8bada697d6b8d7202e7975d73a5845c999fac8b2 (diff)
tst_qlocale: only restore the fp control masks we change
Certain masks are not supported outside 32-bit x86, and will assert on x64. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-106000 Change-Id: Ic9f58e5a19c1db3309edeb5ec529e7a78c929665 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 5d8ce6b7fd..8c9d0793ff 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -1495,8 +1495,7 @@ void tst_QLocale::fpExceptions()
# define _EM_INEXACT 0x00000001
# endif
_clearfp();
- unsigned int oldbits = _controlfp(0, 0);
- _controlfp( 0 | _EM_INEXACT, _MCW_EM );
+ unsigned int oldbits = _controlfp(0 | _EM_INEXACT, _MCW_EM);
#endif
#ifdef QT_USE_FENV
@@ -1514,7 +1513,7 @@ void tst_QLocale::fpExceptions()
#ifdef Q_OS_WIN
_clearfp();
- _controlfp(oldbits, 0xFFFFF);
+ _controlfp(oldbits, _MCW_EM);
#endif
#ifdef QT_USE_FENV