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>
bb10
parent
d15ef5bc3a
commit
83e11b5fc4
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue