diff options
| author | Vinay Deshmukh <32487576+vinay-deshmukh@users.noreply.github.com> | 2025-03-04 10:24:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-04 10:24:35 -0500 |
| commit | 1e6e845d49a336e9da7ca6c576ec45c0b419b5f6 (patch) | |
| tree | 9254ff775ceaf0aa7055ea9171f3571af12a0a3b /libc/src/string/memory_utils | |
| parent | 4c4fd6b03149348cf11af245ad2603d24144a9d5 (diff) | |
[libc] Enable -Wconversion for tests. (#127523)
Relates to: #119281
Diffstat (limited to 'libc/src/string/memory_utils')
| -rw-r--r-- | libc/src/string/memory_utils/utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/string/memory_utils/utils.h b/libc/src/string/memory_utils/utils.h index 5c9bc72208f8..508a70794211 100644 --- a/libc/src/string/memory_utils/utils.h +++ b/libc/src/string/memory_utils/utils.h @@ -263,7 +263,7 @@ LIBC_INLINE void store_aligned(ValueType value, Ptr dst) { static_assert(sizeof(ValueType) >= (sizeof(T) + ... + sizeof(TS))); constexpr size_t SHIFT = sizeof(T) * 8; if constexpr (Endian::IS_LITTLE) { - store<T>(assume_aligned<sizeof(T)>(dst), value & ~T(0)); + store<T>(assume_aligned<sizeof(T)>(dst), T(value & T(~0))); if constexpr (sizeof...(TS) > 0) store_aligned<ValueType, TS...>(value >> SHIFT, dst + sizeof(T)); } else if constexpr (Endian::IS_BIG) { @@ -293,7 +293,7 @@ LIBC_INLINE void store64_aligned(uint64_t value, Ptr dst, size_t offset) { // Advances the pointers p1 and p2 by offset bytes and decrease count by the // same amount. template <typename T1, typename T2> -LIBC_INLINE void adjust(ptrdiff_t offset, T1 *__restrict &p1, +LIBC_INLINE void adjust(uintptr_t offset, T1 *__restrict &p1, T2 *__restrict &p2, size_t &count) { p1 += offset; p2 += offset; |
