diff options
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 |
commit | 277ccbd200ea43590dfc06a93ae184a765327ad0 (patch) | |
tree | d89712e93da5fb2748989353c9ee071102cf3f33 /runtime/dex_file.cc | |
parent | ad17d41841ba1fb177fb0bf175ec0e9f5e1412b3 (diff) | |
download | art-277ccbd200ea43590dfc06a93ae184a765327ad0.tar.gz art-277ccbd200ea43590dfc06a93ae184a765327ad0.tar.bz2 art-277ccbd200ea43590dfc06a93ae184a765327ad0.zip |
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/dex_file.cc')
-rw-r--r-- | runtime/dex_file.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc index 761441eae6..16bc33f76a 100644 --- a/runtime/dex_file.cc +++ b/runtime/dex_file.cc @@ -39,7 +39,6 @@ #include "mirror/string.h" #include "os.h" #include "safe_map.h" -#include "ScopedFd.h" #include "handle_scope-inl.h" #include "thread.h" #include "utf-inl.h" @@ -47,6 +46,11 @@ #include "well_known_classes.h" #include "zip_archive.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#include "ScopedFd.h" +#pragma GCC diagnostic pop + namespace art { const uint8_t DexFile::kDexMagic[] = { 'd', 'e', 'x', '\n' }; @@ -454,8 +458,8 @@ const DexFile::ClassDef* DexFile::FindClassDef(const char* descriptor) const { index = new Index(num_class_defs); for (uint32_t i = 0; i < num_class_defs; ++i) { const ClassDef& class_def = GetClassDef(i); - const char* descriptor = GetClassDescriptor(class_def); - index->insert(std::make_pair(descriptor, &class_def)); + const char* class_descriptor = GetClassDescriptor(class_def); + index->insert(std::make_pair(class_descriptor, &class_def)); } // Sanity check the index still doesn't exist, only 1 thread should build it. CHECK(class_def_index_.LoadSequentiallyConsistent() == nullptr); |