diff options
| author | Augie Fackler <augie@google.com> | 2025-03-05 13:52:31 -0500 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2025-03-05 16:42:40 -0500 |
| commit | da61b0ddc5dcc8f1ac64eaddabdbfec5aa23f22b (patch) | |
| tree | 8750d4c36c31e7d3babb229377b1c521dc9d21d7 /libc/src/string/memory_utils/utils.h | |
| parent | 46236f4c3dbe11e14fe7ac1f4b903637efedfecf (diff) | |
Revert "[libc] Enable -Wconversion for tests. (#127523)"
This reverts commit 1e6e845d49a336e9da7ca6c576ec45c0b419b5f6 because it
changed the 1st parameter of adjust() to be unsigned, but libc itself
calls adjust() with a negative argument in align_backward() in
op_generic.h.
Diffstat (limited to 'libc/src/string/memory_utils/utils.h')
| -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 508a70794211..5c9bc72208f8 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), T(value & T(~0))); + store<T>(assume_aligned<sizeof(T)>(dst), 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(uintptr_t offset, T1 *__restrict &p1, +LIBC_INLINE void adjust(ptrdiff_t offset, T1 *__restrict &p1, T2 *__restrict &p2, size_t &count) { p1 += offset; p2 += offset; |
