summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2019-01-30 08:32:57 -0800
committerAurimas Liutikas <aurimas@google.com>2019-01-30 08:32:57 -0800
commitab364fc3b6ab26ddf4f1b4a6bf01b64056a181ef (patch)
tree33e2040299ad0f39ab677a98f01334d97cc18a34
parent447919d2e5efdf907976e7d2b5f6860dc1400bf3 (diff)
Suppress -Wimplicit-fallthrough in aapt code
AaptAsssets intentinally falls through in a switch statement. This change adds [[fallthrough]]; to suppress this implicit fallthrough. frameworks/base/tools/aapt/AaptAssets.cpp:305:17: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case 5: ^ frameworks/base/tools/aapt/AaptAssets.cpp:305:17: note: insert '[[fallthrough]];' to silence this warning case 5: ^ [[fallthrough]]; frameworks/base/tools/aapt/AaptAssets.cpp:305:17: note: insert 'break;' to avoid fall-through case 5: ^ break; Test: make -j aapt Change-Id: Ia9d2ca3b59eb804e20c6295791f6a19f0f5f63ab
-rw-r--r--tools/aapt/AaptAssets.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 3c3edda85e4f..672731cc2939 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -301,6 +301,7 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
break;
}
// This is not alphabetical, so we fall through to variant
+ [[fallthrough]];
case 5:
case 6:
case 7: