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

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


Author: David CARLIER
Date: 2025-01-04T21:46:08Z
New Revision: d1d400372adc9ae78d8ee9c2387b2c6b062b0dc0

URL: https://github.com/llvm/llvm-project/commit/d1d400372adc9ae78d8ee9c2387b2c6b062b0dc0
DIFF: https://github.com/llvm/llvm-project/commit/d1d400372adc9ae78d8ee9c2387b2c6b062b0dc0.diff

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

Added: 
    

Modified: 
    compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp

Removed: 
    


################################################################################
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};


        


More information about the llvm-commits mailing list