From 78f3c72e8948087352788997a70854dee613352c Mon Sep 17 00:00:00 2001 From: Stefano Cianciulli Date: Tue, 16 May 2023 10:32:54 +0000 Subject: Use C++17's [[maybe_unused]] attribute in ART Bug: 169680875 Test: mmm art Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235 --- runtime/mirror/string-alloc-inl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/mirror/string-alloc-inl.h') diff --git a/runtime/mirror/string-alloc-inl.h b/runtime/mirror/string-alloc-inl.h index cb2dcb2c85..9c2529cef4 100644 --- a/runtime/mirror/string-alloc-inl.h +++ b/runtime/mirror/string-alloc-inl.h @@ -41,7 +41,7 @@ class SetStringCountVisitor { explicit SetStringCountVisitor(int32_t count) : count_(count) { } - void operator()(ObjPtr obj, size_t usable_size ATTRIBUTE_UNUSED) const + void operator()(ObjPtr obj, [[maybe_unused]] size_t usable_size) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); @@ -61,7 +61,7 @@ class SetStringCountAndBytesVisitor { : count_(count), src_array_(src_array), offset_(offset), high_byte_(high_byte) { } - void operator()(ObjPtr obj, size_t usable_size ATTRIBUTE_UNUSED) const + void operator()(ObjPtr obj, [[maybe_unused]] size_t usable_size) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); @@ -96,7 +96,7 @@ class SetStringCountAndUtf16BytesVisitor { : count_(count), src_array_(src_array), offset_(offset) { } - void operator()(ObjPtr obj, size_t usable_size ATTRIBUTE_UNUSED) const + void operator()(ObjPtr obj, [[maybe_unused]] size_t usable_size) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); @@ -132,7 +132,7 @@ class SetStringCountAndValueVisitorFromCharArray { count_(count), src_array_(src_array), offset_(offset) { } - void operator()(ObjPtr obj, size_t usable_size ATTRIBUTE_UNUSED) const + void operator()(ObjPtr obj, [[maybe_unused]] size_t usable_size) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); @@ -163,7 +163,7 @@ class SetStringCountAndValueVisitorFromString { count_(count), src_string_(src_string), offset_(offset) { } - void operator()(ObjPtr obj, size_t usable_size ATTRIBUTE_UNUSED) const + void operator()(ObjPtr obj, [[maybe_unused]] size_t usable_size) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); -- cgit v1.2.3-59-g8ed1b