Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1afb6cb authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

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
parent e08bef25
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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) \
+3 −0
Original line number Diff line number Diff line
@@ -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,
    },
+1 −1
Original line number Diff line number Diff line
@@ -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;