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

Commit fd47182d authored by Nick Desaulniers's avatar Nick Desaulniers
Browse files

[system][bt] address -Wimplicit-fallthrough



The compiler upgrade in b/139945549 can now check C code for
-Wimplicit-fallthrough. In b/143713277, were moving the cflags for
projects that disable this warning to cppflags. For this subsystem, just
address the warnings and remove disabling it.

These cases should be carefully reviewed; modifications that weren't
additions of fallthrough attributes were likely existing bugs.

Bug: 139945549
Bug: 143713277
Test: mm
Change-Id: Icafeed1d18991e83f42e5efd13e8ab8d15068d79
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 800653ae
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ cc_defaults {
cc_library_static {
    name: "libbt-bta",
    defaults: ["fluoride_bta_defaults"],
    cflags: ["-Wno-implicit-fallthrough"],
    srcs: [
        "ag/bta_ag_act.cc",
        "ag/bta_ag_api.cc",
+1 −1
Original line number Diff line number Diff line
@@ -2507,7 +2507,7 @@ static uint8_t bta_dm_sp_cback(tBTM_SP_EVT event, tBTM_SP_EVT_DATA* p_data) {
      sec_event.cfm_req.loc_io_caps = p_data->cfm_req.loc_io_caps;
      sec_event.cfm_req.rmt_io_caps = p_data->cfm_req.rmt_io_caps;

    /* continue to next case */
      [[fallthrough]];
    /* Passkey entry mode, mobile device with output capability is very
        unlikely to receive key request, so skip this event */
    /*case BTM_SP_KEY_REQ_EVT: */
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ static bool check_descriptor(uint8_t* data, uint16_t length,

      case 0x85:  // Report ID
        *has_report_id = TRUE;

        [[fallthrough]];
      default:
        ptr += (item & 0x03);
        break;
+2 −0
Original line number Diff line number Diff line
@@ -305,6 +305,8 @@ static void bta_hf_client_sco_event(tBTA_HF_CLIENT_CB* client_cb,
        case BTA_HF_CLIENT_SCO_LISTEN_E:
          /* create SCO listen connection */
          bta_hf_client_sco_create(client_cb, false);
          /* TODO(b/143901894): Is this correct? */
          [[fallthrough]];

        case BTA_HF_CLIENT_SCO_OPEN_E:
          /* remove listening connection */
+0 −1
Original line number Diff line number Diff line
@@ -122,7 +122,6 @@ cc_library_static {
    ],
    cflags: [
        "-DBUILDCFG",
        "-Wno-implicit-fallthrough",
    ],

}
Loading