diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-03-20 13:15:34 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-03-21 06:34:25 +0100 |
commit | 83e11b5fc42ef5bbb7d0226c672e83f58021869e (patch) | |
tree | b82cc35cd0e58fa63c63beed4478fa3d489eab14 /src/corelib/tools/qhash.cpp | |
parent | d15ef5bc3ae4df5ddc374d4bc8fee736868f1628 (diff) |
Fix build with latest Apple clang version
Building with Apple clang 13.1.6.13160021 (from command line tools 13.3)
results in
qhash.cpp:754:39: error: passing 16-byte aligned argument to 32-byte
aligned parameter 3 of 'operator()' may result in an unaligned pointer
access [-Werror,-Walign-mismatch]
hash2x32bytes(state0, state1, src, src + 1);
^
Help the compiler with deducing the right type for 'src' and 'srcend'.
Also makes 'src' const explicitly.
Change-Id: Id14a034f0fa4c2a002d9b37729d803a50a0e5e9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index ec804da96e..6ee0dc4670 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -744,8 +744,8 @@ aeshash256_ge32(__m256i state0, const uchar *p, size_t len) state1 = _mm256_aesenc_epi128(state1, state1); }; - auto src = reinterpret_cast<const __m256i *>(p); - const auto srcend = reinterpret_cast<const __m256i *>(p + len); + const __m256i *src = reinterpret_cast<const __m256i *>(p); + const __m256i *srcend = reinterpret_cast<const __m256i *>(p + len); __m256i state1 = _mm256_aesenc_epi128(state0, mm256_set1_epz(len)); |