From bc56fc3242ea2fad6630abdee1657f444eee8d30 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 3 Jun 2014 15:37:03 -0700 Subject: Fix compiler warnings. Added GetReference, GetHandle to StackHandleScope to prevent the compiler from optimizing away these loads/stores from inline functions. Change-Id: I4db02dd3194665d844292e74e3a7d7c80e730e06 --- runtime/handle_scope-inl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/handle_scope-inl.h') diff --git a/runtime/handle_scope-inl.h b/runtime/handle_scope-inl.h index 634f2be..62c7614 100644 --- a/runtime/handle_scope-inl.h +++ b/runtime/handle_scope-inl.h @@ -28,8 +28,7 @@ template inline StackHandleScope::StackHandleScope(Thread* self) : HandleScope(kNumReferences), self_(self), pos_(0) { // TODO: Figure out how to use a compile assert. - DCHECK_EQ(OFFSETOF_MEMBER(HandleScope, references_), - OFFSETOF_MEMBER(StackHandleScope<1>, references_storage_)); + DCHECK_EQ(&references_[0], &references_storage_[0]); for (size_t i = 0; i < kNumReferences; ++i) { SetReference(i, nullptr); } -- cgit v1.1