summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_common.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-11-03 21:36:10 -0800
committer Andreas Gampe <agampe@google.com> 2014-11-04 18:40:08 -0800
commit277ccbd200ea43590dfc06a93ae184a765327ad0 (patch)
treed89712e93da5fb2748989353c9ee071102cf3f33 /runtime/interpreter/interpreter_common.cc
parentad17d41841ba1fb177fb0bf175ec0e9f5e1412b3 (diff)
ART: More warnings
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r--runtime/interpreter/interpreter_common.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index 5c77b96a5f..eb80c307f6 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -855,12 +855,12 @@ static void UnstartedRuntimeInvoke(Thread* self, MethodHelper* mh,
// Special managed code cut-out to allow field lookup in a un-started runtime that'd fail
// going the reflective Dex way.
Class* klass = shadow_frame->GetVRegReference(arg_offset)->AsClass();
- String* name = shadow_frame->GetVRegReference(arg_offset + 1)->AsString();
+ String* name2 = shadow_frame->GetVRegReference(arg_offset + 1)->AsString();
ArtField* found = NULL;
ObjectArray<ArtField>* fields = klass->GetIFields();
for (int32_t i = 0; i < fields->GetLength() && found == NULL; ++i) {
ArtField* f = fields->Get(i);
- if (name->Equals(f->GetName())) {
+ if (name2->Equals(f->GetName())) {
found = f;
}
}
@@ -868,14 +868,14 @@ static void UnstartedRuntimeInvoke(Thread* self, MethodHelper* mh,
fields = klass->GetSFields();
for (int32_t i = 0; i < fields->GetLength() && found == NULL; ++i) {
ArtField* f = fields->Get(i);
- if (name->Equals(f->GetName())) {
+ if (name2->Equals(f->GetName())) {
found = f;
}
}
}
CHECK(found != NULL)
<< "Failed to find field in Class.getDeclaredField in un-started runtime. name="
- << name->ToModifiedUtf8() << " class=" << PrettyDescriptor(klass);
+ << name2->ToModifiedUtf8() << " class=" << PrettyDescriptor(klass);
// TODO: getDeclaredField calls GetType once the field is found to ensure a
// NoClassDefFoundError is thrown if the field's type cannot be resolved.
Class* jlr_Field = self->DecodeJObject(WellKnownClasses::java_lang_reflect_Field)->AsClass();