summaryrefslogtreecommitdiff
path: root/runtime/mirror/string-alloc-inl.h
diff options
context:
space:
mode:
author Stefano Cianciulli <scianciulli@google.com> 2023-05-16 10:32:54 +0000
committer Stefano Cianciulli <scianciulli@google.com> 2023-05-22 10:36:39 +0000
commit78f3c72e8948087352788997a70854dee613352c (patch)
tree306db3c15bc4b7af149bcf3e07be533e50679b88 /runtime/mirror/string-alloc-inl.h
parentdc771261232c2ff702373f396a5a7fe586e2f0a6 (diff)
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875 Test: mmm art Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'runtime/mirror/string-alloc-inl.h')
-rw-r--r--runtime/mirror/string-alloc-inl.h10
1 files changed, 5 insertions, 5 deletions
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<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> 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> string = ObjPtr<String>::DownCast(obj);
@@ -61,7 +61,7 @@ class SetStringCountAndBytesVisitor {
: count_(count), src_array_(src_array), offset_(offset), high_byte_(high_byte) {
}
- void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> 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> string = ObjPtr<String>::DownCast(obj);
@@ -96,7 +96,7 @@ class SetStringCountAndUtf16BytesVisitor {
: count_(count), src_array_(src_array), offset_(offset) {
}
- void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> 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> string = ObjPtr<String>::DownCast(obj);
@@ -132,7 +132,7 @@ class SetStringCountAndValueVisitorFromCharArray {
count_(count), src_array_(src_array), offset_(offset) {
}
- void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> 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> string = ObjPtr<String>::DownCast(obj);
@@ -163,7 +163,7 @@ class SetStringCountAndValueVisitorFromString {
count_(count), src_string_(src_string), offset_(offset) {
}
- void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> 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> string = ObjPtr<String>::DownCast(obj);