[compiler-rt] 0f6d950 - [NFCI] Fix set-but-unused warning in asan_fake_stack.cpp
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 15:45:40 PDT 2022
Author: Mitch Phillips
Date: 2022-03-23T15:45:09-07:00
New Revision: 0f6d9501cf49ce02937099350d08f20c4af86f3d
URL: https://github.com/llvm/llvm-project/commit/0f6d9501cf49ce02937099350d08f20c4af86f3d
DIFF: https://github.com/llvm/llvm-project/commit/0f6d9501cf49ce02937099350d08f20c4af86f3d.diff
LOG: [NFCI] Fix set-but-unused warning in asan_fake_stack.cpp
Added:
Modified:
compiler-rt/lib/asan/asan_fake_stack.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_fake_stack.cpp b/compiler-rt/lib/asan/asan_fake_stack.cpp
index 08d81c72597c4..74a039b657985 100644
--- a/compiler-rt/lib/asan/asan_fake_stack.cpp
+++ b/compiler-rt/lib/asan/asan_fake_stack.cpp
@@ -140,7 +140,6 @@ void FakeStack::HandleNoReturn() {
// We do it based on their 'real_stack' values -- everything that is lower
// than the current real_stack is garbage.
NOINLINE void FakeStack::GC(uptr real_stack) {
- uptr collected = 0;
for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) {
u8 *flags = GetFlags(stack_size_log(), class_id);
for (uptr i = 0, n = NumberOfFrames(stack_size_log(), class_id); i < n;
@@ -150,7 +149,6 @@ NOINLINE void FakeStack::GC(uptr real_stack) {
GetFrame(stack_size_log(), class_id, i));
if (ff->real_stack < real_stack) {
flags[i] = 0;
- collected++;
}
}
}
More information about the llvm-commits
mailing list