summaryrefslogtreecommitdiff
path: root/runtime/gc/allocator/rosalloc.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-10-09 21:56:44 -0700
committerIan Rogers <irogers@google.com>2014-10-09 22:22:46 -0700
commitfc787ecd91127b2c8458afd94e5148e2ae51a1f5 (patch)
treeef48c0f511ee9bf4ed85607cc4d530bace7e6cae /runtime/gc/allocator/rosalloc.cc
parent8fa8c904f7c783204a1dc9438429391d256658da (diff)
Enable -Wimplicit-fallthrough.
Falling through switch cases on a clang build must now annotate the fallthrough with the FALLTHROUGH_INTENDED macro. Bug: 17731372 Change-Id: I836451cd5f96b01d1ababdbf9eef677fe8fa8324
Diffstat (limited to 'runtime/gc/allocator/rosalloc.cc')
-rw-r--r--runtime/gc/allocator/rosalloc.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/gc/allocator/rosalloc.cc b/runtime/gc/allocator/rosalloc.cc
index a3408cf0fa..0cea89dc17 100644
--- a/runtime/gc/allocator/rosalloc.cc
+++ b/runtime/gc/allocator/rosalloc.cc
@@ -507,13 +507,12 @@ size_t RosAlloc::FreeInternal(Thread* self, void* ptr) {
--pm_idx;
DCHECK_LT(pm_idx, capacity_ / kPageSize);
} while (page_map_[pm_idx] != kPageMapRun);
- // Fall-through.
+ FALLTHROUGH_INTENDED;
case kPageMapRun:
run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize);
DCHECK_EQ(run->magic_num_, kMagicNum);
break;
case kPageMapReleased:
- // Fall-through.
case kPageMapEmpty:
LOG(FATAL) << "Unreachable - page map type: " << page_map_[pm_idx];
return 0;
@@ -2138,7 +2137,7 @@ size_t RosAlloc::ReleasePages() {
break;
}
}
- // Fall through.
+ FALLTHROUGH_INTENDED;
}
case kPageMapLargeObject: // Fall through.
case kPageMapLargeObjectPart: // Fall through.