From 2efd5ad7af0e6aac0139a96ca1959fe8394ca13b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 29 Apr 2022 17:35:04 +0200 Subject: [PATCH] QSimd: fix MSVC C4319 warning on ARM Says MSVC: qsimd.cpp(629): warning C4319: '~': zero extending 'QCpuFeatureType' to 'quint64' of greater size On non-x86 architectures, QCpuFeatureType is just uint32_t, thus the warning. Fix by casting to quint64 before negating. Amends 5f7e02efb8b70adf00a4f393e7c2a1c93daef9b3. Change-Id: I1a9451abf79d51c1993b7f6d2a842169a5de7b3c Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Thiago Macieira --- src/corelib/global/qsimd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qsimd.cpp b/src/corelib/global/qsimd.cpp index 094c7d93a3..2dad8a6595 100644 --- a/src/corelib/global/qsimd.cpp +++ b/src/corelib/global/qsimd.cpp @@ -626,7 +626,7 @@ uint64_t QT_MANGLE_NAMESPACE(qDetectCpuFeatures)() bool runningOnValgrind = false; #endif if (Q_UNLIKELY(!runningOnValgrind && minFeatureTest != 0 && (f & minFeatureTest) != minFeatureTest)) { - quint64 missing = minFeatureTest & ~f; + quint64 missing = minFeatureTest & ~quint64(f); fprintf(stderr, "Incompatible processor. This Qt build requires the following features:\n "); for (uint i = 0; i < std::size(features_indices); ++i) { if (missing & (Q_UINT64_C(1) << i))