[libc-commits] [libc] [libc] Enable -Wconversion for tests. (PR #127523)

Vinay Deshmukh via libc-commits libc-commits at lists.llvm.org
Wed Mar 5 15:11:20 PST 2025


================
@@ -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,
----------------
vinay-deshmukh wrote:

I see.

I (incorrectly) concluded that adding to count was malformed, probably due to mixing of ptrdiff_t and size_t

Strange that the warnings didn't catch the negative argument

Will fix it 

https://github.com/llvm/llvm-project/pull/127523


More information about the libc-commits mailing list