summaryrefslogtreecommitdiff
path: root/runtime/dex_instruction-inl.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-10-09 21:56:44 -0700
committer Ian Rogers <irogers@google.com> 2014-10-09 22:22:46 -0700
commitfc787ecd91127b2c8458afd94e5148e2ae51a1f5 (patch)
treeef48c0f511ee9bf4ed85607cc4d530bace7e6cae /runtime/dex_instruction-inl.h
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/dex_instruction-inl.h')
-rw-r--r--runtime/dex_instruction-inl.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/runtime/dex_instruction-inl.h b/runtime/dex_instruction-inl.h
index ad9491fda6..dd65f2c0c6 100644
--- a/runtime/dex_instruction-inl.h
+++ b/runtime/dex_instruction-inl.h
@@ -460,11 +460,21 @@ inline void Instruction::GetVarArgs(uint32_t arg[5], uint16_t inst_data) const {
* copies of those.) Note that cases 5..2 fall through.
*/
switch (count) {
- case 5: arg[4] = InstA(inst_data);
- case 4: arg[3] = (regList >> 12) & 0x0f;
- case 3: arg[2] = (regList >> 8) & 0x0f;
- case 2: arg[1] = (regList >> 4) & 0x0f;
- case 1: arg[0] = regList & 0x0f; break;
+ case 5:
+ arg[4] = InstA(inst_data);
+ FALLTHROUGH_INTENDED;
+ case 4:
+ arg[3] = (regList >> 12) & 0x0f;
+ FALLTHROUGH_INTENDED;
+ case 3:
+ arg[2] = (regList >> 8) & 0x0f;
+ FALLTHROUGH_INTENDED;
+ case 2:
+ arg[1] = (regList >> 4) & 0x0f;
+ FALLTHROUGH_INTENDED;
+ case 1:
+ arg[0] = regList & 0x0f;
+ break;
default: // case 0
break; // Valid, but no need to do anything.
}