diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /runtime/mirror/object.cc | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'runtime/mirror/object.cc')
-rw-r--r-- | runtime/mirror/object.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/mirror/object.cc b/runtime/mirror/object.cc index 5016c2003a..940b82dc0a 100644 --- a/runtime/mirror/object.cc +++ b/runtime/mirror/object.cc @@ -66,9 +66,9 @@ class CopyReferenceFieldsWithReadBarrierVisitor { } // Unused since we don't copy class native roots. - void VisitRootIfNonNull(mirror::CompressedReference<mirror::Object>* root ATTRIBUTE_UNUSED) - const {} - void VisitRoot(mirror::CompressedReference<mirror::Object>* root ATTRIBUTE_UNUSED) const {} + void VisitRootIfNonNull( + [[maybe_unused]] mirror::CompressedReference<mirror::Object>* root) const {} + void VisitRoot([[maybe_unused]] mirror::CompressedReference<mirror::Object>* root) const {} private: const ObjPtr<Object> dest_obj_; @@ -144,7 +144,7 @@ class CopyObjectVisitor { CopyObjectVisitor(Handle<Object>* orig, size_t num_bytes) : orig_(orig), num_bytes_(num_bytes) {} - 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_) { Object::CopyObject(obj, orig_->Get(), num_bytes_); } |