Clean up the trivial uses of __attribute__((unused)).
My usual objection would be that this leads to breakage, but since we compile
all variants all the time anyway, I think this is probably the better choice.
In particular, it means we can notice when no variant needs the parameter any
more.
Change-Id: Ia7e5c1a58597d9f9ff6f337c3d9cf00ecdf4c208
diff --git a/src/object.h b/src/object.h
index 0a670ee..a609433 100644
--- a/src/object.h
+++ b/src/object.h
@@ -2332,8 +2332,8 @@
return GetField32(OFFSET_OF_OBJECT_MEMBER(Method, method_dex_index_), false);
}
-inline void Method::AssertPcIsWithinCode(uintptr_t __attribute__((unused)) pc) const {
-#ifndef NDEBUG
+#if !defined(NDEBUG)
+inline void Method::AssertPcIsWithinCode(uintptr_t pc) const {
if (IsNative() || IsRuntimeMethod() || IsProxyMethod()) {
return;
}
@@ -2346,8 +2346,10 @@
<< " pc=" << std::hex << pc
<< " code=" << GetCode()
<< " size=" << GetCodeSize();
-#endif
}
+#else
+inline void Method::AssertPcIsWithinCode(uintptr_t) const {}
+#endif
inline String* Class::GetName() const {
return GetFieldObject<String*>(OFFSET_OF_OBJECT_MEMBER(Class, name_), false);