[compiler-rt] ae234a7 - [NFC][sanitizer] Fix "not used" warning in test
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 20:16:35 PST 2021
Author: Vitaly Buka
Date: 2021-12-01T20:16:25-08:00
New Revision: ae234a7545db8b73297f56508d95a4f85cfd7c1f
URL: https://github.com/llvm/llvm-project/commit/ae234a7545db8b73297f56508d95a4f85cfd7c1f
DIFF: https://github.com/llvm/llvm-project/commit/ae234a7545db8b73297f56508d95a4f85cfd7c1f.diff
LOG: [NFC][sanitizer] Fix "not used" warning in test
Added:
Modified:
compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cpp
index c76644f5dba20..8e7be955a1963 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cpp
@@ -100,6 +100,7 @@ TEST(SanitizerCommon, Mprotect) {
MprotectNoAccess(reinterpret_cast<uptr>(mem), PageSize);
volatile u8 t;
+ (void)t;
EXPECT_DEATH(t = mem[0], "");
EXPECT_DEATH(t = mem[PageSize / 2], "");
EXPECT_DEATH(t = mem[PageSize - 1], "");
More information about the llvm-commits
mailing list