Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hash: Add explicit typecasts to fix C++ compilation issues
C++ does not allow implicit conversion from void pointer to a specific pointer type. This change removes the cast from uint32_t* to void* in `hash_words_32aligned` and adds an explicit typecast from uint32_t* to uint64_t* in `hash_words_inline`. This issue was initially discovered on G++ v9.2.0 when a downstream C++ application included the hash.h header file and was compiled on an AMD Ryzen Zen 2 CPU (__SSE4_2__ && __x86_64__). On the latest G++ version, it would throw an error. On the latest GCC version with `-Wc++-compat`, it would throw a warning. Acked-by: Mike Pattrick <[email protected]> Signed-off-by: James Raphael Tiovalen <[email protected]> Signed-off-by: 0-day Robot <[email protected]>
- Loading branch information