[compiler-rt] [compiler-rt][rtsan] fix unit tests by sanitizer-aarch64-linux report. (PR #121666)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 13:13:17 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: David CARLIER (devnexen)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp (+2-2) 


``````````diff
diff --git a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
index 15dfc1af016251..d9872c54b26148 100644
--- a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
+++ b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
@@ -361,10 +361,10 @@ TEST_F(RtsanFileTest, FopenCookieDieWhenRealtime) {
     FILE *fp;
     size_t read;
   } fh = {f, 0};
-  auto CookieRead = [this](void *cookie, char *buf, size_t size) {
+  auto CookieRead = [](void *cookie, char *buf, size_t size) {
     fholder *p = reinterpret_cast<fholder *>(cookie);
     p->read = fread(static_cast<void *>(buf), 1, size, p->fp);
-    EXPECT_NE(0, p->read);
+    EXPECT_NE(0u, p->read);
   };
   cookie_io_functions_t funcs = {(cookie_read_function_t *)&CookieRead, nullptr,
                                  nullptr, nullptr};

``````````

</details>


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


More information about the llvm-commits mailing list