diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /openjdkjvmti/alloc_manager.cc | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'openjdkjvmti/alloc_manager.cc')
-rw-r--r-- | openjdkjvmti/alloc_manager.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/openjdkjvmti/alloc_manager.cc b/openjdkjvmti/alloc_manager.cc index 5910073d79..b20e098546 100644 --- a/openjdkjvmti/alloc_manager.cc +++ b/openjdkjvmti/alloc_manager.cc @@ -198,9 +198,8 @@ void AllocationManager::PauseAllocations(art::Thread* self) { // Force every thread to either be suspended or pass through a barrier. art::ScopedThreadSuspension sts(self, art::ThreadState::kSuspended); art::Barrier barrier(0); - art::FunctionClosure fc([&](art::Thread* thr ATTRIBUTE_UNUSED) { - barrier.Pass(art::Thread::Current()); - }); + art::FunctionClosure fc( + [&]([[maybe_unused]] art::Thread* thr) { barrier.Pass(art::Thread::Current()); }); size_t requested = art::Runtime::Current()->GetThreadList()->RunCheckpoint(&fc); barrier.Increment(self, requested); } |