summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/androidfw/Android.bp2
-rw-r--r--libs/androidfw/Locale.cpp2
-rw-r--r--libs/androidfw/ResourceTypes.cpp6
3 files changed, 6 insertions, 4 deletions
diff --git a/libs/androidfw/Android.bp b/libs/androidfw/Android.bp
index 92efb6ba8914..98af3eb05391 100644
--- a/libs/androidfw/Android.bp
+++ b/libs/androidfw/Android.bp
@@ -59,8 +59,6 @@ cc_library {
"ZipFileRO.cpp",
"ZipUtils.cpp",
],
- // Allow implicit fallthroughs in Locale.cpp and ResourceTypes.cpp until they are fixed.
- cflags: ["-Wno-implicit-fallthrough"],
export_include_dirs: ["include"],
export_shared_lib_headers: ["libz"],
target: {
diff --git a/libs/androidfw/Locale.cpp b/libs/androidfw/Locale.cpp
index 2870066ccbba..3eedda88fdce 100644
--- a/libs/androidfw/Locale.cpp
+++ b/libs/androidfw/Locale.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "android-base/macros.h"
#include "androidfw/Locale.h"
#include "androidfw/Util.h"
@@ -162,6 +163,7 @@ bool LocaleValue::InitFromBcp47TagImpl(const StringPiece& bcp47tag, const char s
set_script(subtags[1].c_str());
break;
}
+ FALLTHROUGH_INTENDED;
case 5:
case 6:
case 7:
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 388548b174f9..76db18de6122 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -29,6 +29,7 @@
#include <memory>
#include <type_traits>
+#include <android-base/macros.h>
#include <androidfw/ByteBucketArray.h>
#include <androidfw/ResourceTypes.h>
#include <androidfw/TypeWrappers.h>
@@ -3073,6 +3074,7 @@ struct LocaleParserState {
}
break;
}
+ FALLTHROUGH_INTENDED;
case 5:
case 6:
case 7:
@@ -7002,7 +7004,7 @@ status_t DynamicRefTable::lookupResourceValue(Res_value* value) const {
switch (value->dataType) {
case Res_value::TYPE_ATTRIBUTE:
resolvedType = Res_value::TYPE_ATTRIBUTE;
- // fallthrough
+ FALLTHROUGH_INTENDED;
case Res_value::TYPE_REFERENCE:
// Only resolve non-dynamic references and attributes if the package is loaded as a
// library or if a shared library is attempting to retrieve its own resource
@@ -7015,7 +7017,7 @@ status_t DynamicRefTable::lookupResourceValue(Res_value* value) const {
break;
case Res_value::TYPE_DYNAMIC_ATTRIBUTE:
resolvedType = Res_value::TYPE_ATTRIBUTE;
- // fallthrough
+ FALLTHROUGH_INTENDED;
case Res_value::TYPE_DYNAMIC_REFERENCE:
break;
default: