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 5f7e02efb8.

Change-Id: I1a9451abf79d51c1993b7f6d2a842169a5de7b3c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2022-04-29 17:35:04 +02:00
parent 4f72db2fce
commit 2efd5ad7af
1 changed files with 1 additions and 1 deletions

View File

@ -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))