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 15dfc1af01625..d9872c54b2614 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(cookie); p->read = fread(static_cast(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};