[libc-commits] [libc] [libc] Fix `size_t` and `unsigned long` mismatch on riscv32 in test. (PR #132028)

via libc-commits libc-commits at lists.llvm.org
Wed Mar 19 07:03:35 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Connector Switch (c8ef)

<details>
<summary>Changes</summary>

Fix regression: https://github.com/llvm/llvm-project/pull/131431#issuecomment-2735029529

---
Full diff: https://github.com/llvm/llvm-project/pull/132028.diff


1 Files Affected:

- (modified) libc/test/src/search/lsearch_test.cpp (+1-1) 


``````````diff
diff --git a/libc/test/src/search/lsearch_test.cpp b/libc/test/src/search/lsearch_test.cpp
index f15ed217181ef..9e58b87772c3b 100644
--- a/libc/test/src/search/lsearch_test.cpp
+++ b/libc/test/src/search/lsearch_test.cpp
@@ -44,7 +44,7 @@ TEST(LlvmLibcLsearchTest, SearchNonExistent) {
   void *ret = LIBC_NAMESPACE::lsearch(&key, list, &len, sizeof(int), compar);
   ASSERT_TRUE(ret == &list[3]);
   ASSERT_EQ(key, list[3]);
-  ASSERT_EQ(len, 4UL);
+  ASSERT_EQ(len, size_t{4});
 }
 
 TEST(LlvmLibcLsearchTest, SearchExceptional) {

``````````

</details>


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


More information about the libc-commits mailing list