summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2018-10-22 12:25:50 -0700
committer Chih-Hung Hsieh <chh@google.com> 2018-10-22 12:25:50 -0700
commite1afb6cb297f23e905de5b8eadb33461358d6aae (patch)
tree7839e9ca96e8e99593af7962ed7a75676fcce046
parente08bef258c6da238a274959aad66154d4a20b0c7 (diff)
Allow implicit-fallthrough warnings locally.
It will be a global error by default. Cherry pick lost changes from AOSP, for Android.mk and main.cpp. Test: make checkbuild Bug: 112564944 Change-Id: I6f1024fa5e31302af27fa9d5bac195e511f4ba20 Exempt-From-Owner-Approval: do not block on new warnings
-rw-r--r--cmds/incidentd/Android.mk6
-rw-r--r--libs/hwui/Android.bp3
-rw-r--r--libs/hwui/tests/macrobench/main.cpp2
3 files changed, 10 insertions, 1 deletions
diff --git a/cmds/incidentd/Android.mk b/cmds/incidentd/Android.mk
index db864aed6bdc..eba558653b04 100644
--- a/cmds/incidentd/Android.mk
+++ b/cmds/incidentd/Android.mk
@@ -33,6 +33,9 @@ LOCAL_SRC_FILES := $(call all-cpp-files-under, src) \
LOCAL_CFLAGS += \
-Wall -Werror -Wno-missing-field-initializers -Wno-unused-variable -Wunused-parameter
+# Allow implicit fallthrough in IncidentService.cpp:85 until it is fixed.
+LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
+
ifeq (debug,)
LOCAL_CFLAGS += \
-g -O0
@@ -100,6 +103,9 @@ LOCAL_MODULE_TAGS := tests
LOCAL_CFLAGS := -Werror -Wall -Wno-unused-variable -Wunused-parameter
+# Allow implicit fallthrough in IncidentService.cpp:85 until it is fixed.
+LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
+
LOCAL_C_INCLUDES += $(LOCAL_PATH)/src
LOCAL_SRC_FILES := $(call all-cpp-files-under, tests) \
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 503951d1adc6..f0053a48ae3d 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -231,6 +231,9 @@ cc_defaults {
"protos/graphicsstats.proto",
],
+ // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
+ cflags: ["-Wno-implicit-fallthrough"],
+
proto: {
export_proto_headers: true,
},
diff --git a/libs/hwui/tests/macrobench/main.cpp b/libs/hwui/tests/macrobench/main.cpp
index e3c97ce686d9..524dfb0fe4ef 100644
--- a/libs/hwui/tests/macrobench/main.cpp
+++ b/libs/hwui/tests/macrobench/main.cpp
@@ -288,7 +288,7 @@ void parseOptions(int argc, char* argv[]) {
case '?':
fprintf(stderr, "Unrecognized option '%s'\n", argv[optind - 1]);
- // fall-through
+ [[fallthrough]];
default:
error = true;
break;