[compiler-rt] [compiler-rt][rtsan] fix unit tests by sanitizer-aarch64-linux report. (PR #121666)
David CARLIER via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 4 13:12:43 PST 2025
https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/121666
None
>From b5479faeb73d9470438388b04e2c1420cb5bac18 Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen at gmail.com>
Date: Sat, 4 Jan 2025 21:08:43 +0000
Subject: [PATCH] [compiler-rt][rtsan] fix unit tests by
sanitizer-aarch64-linux report.
---
compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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