summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2017-04-25 22:33:06 -0700
committerYi Kong <yikong@google.com>2017-04-28 11:04:12 -0700
commit88307edcd5c35bd5f602b4c6b2464c2d4332753e (patch)
treecb41c36536ae87483daa24b6fcf4381b9a5df15d
parent18457f487316b2ed2dd584f3e1f07e939e18aef5 (diff)
downloadandroid_art-88307edcd5c35bd5f602b4c6b2464c2d4332753e.tar.gz
android_art-88307edcd5c35bd5f602b4c6b2464c2d4332753e.tar.bz2
android_art-88307edcd5c35bd5f602b4c6b2464c2d4332753e.zip
Fix up code warning and errors
Discovered by new LLVM rebase. Clean up, no functionality change. Test: build Bug: 37752547 Change-Id: I7df6097706e0772226dcb07611e7d044a6085421
-rw-r--r--cmdline/cmdline_parser.h2
-rw-r--r--compiler/utils/swap_space.h2
-rw-r--r--runtime/dex_file_annotations.cc2
-rw-r--r--runtime/gc/accounting/mod_union_table.cc6
-rw-r--r--runtime/gc/collector/mark_compact.cc2
5 files changed, 7 insertions, 7 deletions
diff --git a/cmdline/cmdline_parser.h b/cmdline/cmdline_parser.h
index d82fd488e9..32480dd915 100644
--- a/cmdline/cmdline_parser.h
+++ b/cmdline/cmdline_parser.h
@@ -612,7 +612,7 @@ struct CmdlineParser {
template <typename TVariantMap,
template <typename TKeyValue> class TVariantMapKey>
template <typename TArg>
-CmdlineParser<TVariantMap, TVariantMapKey>::ArgumentBuilder<TArg>
+typename CmdlineParser<TVariantMap, TVariantMapKey>::template ArgumentBuilder<TArg>
CmdlineParser<TVariantMap, TVariantMapKey>::CreateArgumentBuilder(
CmdlineParser<TVariantMap, TVariantMapKey>::Builder& parent) {
return CmdlineParser<TVariantMap, TVariantMapKey>::ArgumentBuilder<TArg>(
diff --git a/compiler/utils/swap_space.h b/compiler/utils/swap_space.h
index c286b820fe..0ff9fc69ed 100644
--- a/compiler/utils/swap_space.h
+++ b/compiler/utils/swap_space.h
@@ -78,7 +78,7 @@ class SwapSpace {
mutable FreeByStartSet::const_iterator free_by_start_entry;
};
struct FreeBySizeComparator {
- bool operator()(const FreeBySizeEntry& lhs, const FreeBySizeEntry& rhs) {
+ bool operator()(const FreeBySizeEntry& lhs, const FreeBySizeEntry& rhs) const {
if (lhs.size != rhs.size) {
return lhs.size < rhs.size;
} else {
diff --git a/runtime/dex_file_annotations.cc b/runtime/dex_file_annotations.cc
index 6b9654dc49..0df9e2f6fe 100644
--- a/runtime/dex_file_annotations.cc
+++ b/runtime/dex_file_annotations.cc
@@ -1135,7 +1135,7 @@ mirror::Object* GetAnnotationForMethodParameter(ArtMethod* method,
bool GetParametersMetadataForMethod(ArtMethod* method,
MutableHandle<mirror::ObjectArray<mirror::String>>* names,
MutableHandle<mirror::IntArray>* access_flags) {
- const DexFile::AnnotationSetItem::AnnotationSetItem* annotation_set =
+ const DexFile::AnnotationSetItem* annotation_set =
FindAnnotationSetForMethod(method);
if (annotation_set == nullptr) {
return false;
diff --git a/runtime/gc/accounting/mod_union_table.cc b/runtime/gc/accounting/mod_union_table.cc
index 34e30c177f..c416b9cc3d 100644
--- a/runtime/gc/accounting/mod_union_table.cc
+++ b/runtime/gc/accounting/mod_union_table.cc
@@ -391,7 +391,7 @@ void ModUnionTableReferenceCache::VisitObjects(ObjectCallback* callback, void* a
uintptr_t end = start + CardTable::kCardSize;
live_bitmap->VisitMarkedRange(start,
end,
- [this, callback, arg](mirror::Object* obj) {
+ [callback, arg](mirror::Object* obj) {
callback(obj, arg);
});
}
@@ -402,7 +402,7 @@ void ModUnionTableReferenceCache::VisitObjects(ObjectCallback* callback, void* a
uintptr_t end = start + CardTable::kCardSize;
live_bitmap->VisitMarkedRange(start,
end,
- [this, callback, arg](mirror::Object* obj) {
+ [callback, arg](mirror::Object* obj) {
callback(obj, arg);
});
}
@@ -560,7 +560,7 @@ void ModUnionTableCardCache::VisitObjects(ObjectCallback* callback, void* arg) {
<< start << " " << *space_;
space_->GetLiveBitmap()->VisitMarkedRange(start,
start + CardTable::kCardSize,
- [this, callback, arg](mirror::Object* obj) {
+ [callback, arg](mirror::Object* obj) {
callback(obj, arg);
});
});
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc
index cab293f23c..9d3d950a0f 100644
--- a/runtime/gc/collector/mark_compact.cc
+++ b/runtime/gc/collector/mark_compact.cc
@@ -140,7 +140,7 @@ inline mirror::Object* MarkCompact::MarkObject(mirror::Object* obj) {
}
} else {
DCHECK(!space_->HasAddress(obj));
- auto slow_path = [this](const mirror::Object* ref)
+ auto slow_path = [](const mirror::Object* ref)
REQUIRES_SHARED(Locks::mutator_lock_) {
// Marking a large object, make sure its aligned as a sanity check.
if (!IsAligned<kPageSize>(ref)) {