From dbd38b121920d82cc9b6464f7d8b5b5b4d8c8698 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 30 Jun 2023 13:27:52 -0700 Subject: [PATCH] [libc] Add missing cast in x86 big_endian_cmp_mask Implicit narrowing conversions from int to uint16_t get a compiler warning with the warning settings used in the Fuchsia build. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D154256 --- libc/src/string/memory_utils/op_x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/src/string/memory_utils/op_x86.h b/libc/src/string/memory_utils/op_x86.h index 2bfa62e..8758541 100644 --- a/libc/src/string/memory_utils/op_x86.h +++ b/libc/src/string/memory_utils/op_x86.h @@ -129,7 +129,7 @@ LIBC_INLINE __m128i bytewise_reverse(__m128i value) { 8, 9, 10, 11, 12, 13, 14, 15)); } LIBC_INLINE uint16_t big_endian_cmp_mask(__m128i max, __m128i value) { - return _mm_movemask_epi8(bytewise_reverse(_mm_cmpeq_epi8(max, value))); + return static_cast(_mm_movemask_epi8(bytewise_reverse(_mm_cmpeq_epi8(max, value)))); } template <> LIBC_INLINE bool eq<__m128i>(CPtr p1, CPtr p2, size_t offset) { const auto a = load<__m128i>(p1, offset); -- 2.7.4