Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFCI][scudo] Remove unused variable 'MaxCount' #100201

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

thurstond
Copy link
Contributor

@thurstond thurstond commented Jul 23, 2024

Fixes "error: unused variable 'MaxCount' [-Werror,-Wunused-variable]", which is no longer used after #99409

Fixes "error: unused variable 'MaxCount' [-Werror,-Wunused-variable]"
which is no longer used after llvm#99409
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 23, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Thurston Dang (thurstond)

Changes

Fixes "error: unused variable 'MaxCount' [-Werror,-Wunused-variable]" which is no longer used after #99409


Full diff: https://github.com/llvm/llvm-project/pull/100201.diff

1 Files Affected:

  • (modified) compiler-rt/lib/scudo/standalone/secondary.h (-2)
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index b8e12db934963..d8505742d6054 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -332,7 +332,6 @@ template <typename Config> class MapAllocatorCache {
   bool retrieve(Options Options, uptr Size, uptr Alignment, uptr HeadersSize,
                 LargeBlock::Header **H, bool *Zeroed) EXCLUDES(Mutex) {
     const uptr PageSize = getPageSizeCached();
-    const u32 MaxCount = atomic_load_relaxed(&MaxEntriesCount);
     // 10% of the requested size proved to be the optimal choice for
     // retrieving cached blocks after testing several options.
     constexpr u32 FragmentedBytesDivisor = 10;
@@ -449,7 +448,6 @@ template <typename Config> class MapAllocatorCache {
         Quarantine[I].invalidate();
       }
     }
-    const u32 MaxCount = atomic_load_relaxed(&MaxEntriesCount);
     for (u32 I = LRUHead; I != CachedBlock::InvalidEntry; I = Entries[I].Next) {
       Entries[I].MemMap.setMemoryPermission(Entries[I].CommitBase,
                                             Entries[I].CommitSize, 0);

@thurstond thurstond changed the title [NFCI][scudo] Remove unused variable [NFCI][scudo] Remove unused variable 'MaxCount' Jul 23, 2024
@thurstond thurstond merged commit ce811fb into llvm:main Jul 23, 2024
8 of 9 checks passed
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
Fixes "error: unused variable 'MaxCount' [-Werror,-Wunused-variable]",
which is no longer used after
#99409

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants