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

Commit 26326c17 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Jakub Pawlowski
Browse files

Suppress implicit-fallthrough warnings.

Add FALLTHROUGH_INTENDED for clang compiler.

Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: Iedf7e46445101a5e3358473e1200212d67cf58d1
parent ae72f8ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -700,8 +700,8 @@ static int a2dp_write_output_audio_config(struct a2dp_stream_common* common) {
      codec_config.bits_per_sample = BTAV_A2DP_CODEC_BITS_PER_SAMPLE_32;
      break;
    case AUDIO_FORMAT_PCM_8_24_BIT:
    // FALLTHROUGH
      // All 24-bit audio is expected in AUDIO_FORMAT_PCM_24_BIT_PACKED format
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    default:
      ERROR("Invalid audio format: 0x%x", common->cfg.format);
      return -1;
+2 −2
Original line number Diff line number Diff line
@@ -693,8 +693,8 @@ static int ha_write_output_audio_config(struct ha_stream_common* common) {
      codec_config.bits_per_sample = BTAV_A2DP_CODEC_BITS_PER_SAMPLE_32;
      break;
    case AUDIO_FORMAT_PCM_8_24_BIT:
    // FALLTHROUGH
      // All 24-bit audio is expected in AUDIO_FORMAT_PCM_24_BIT_PACKED format
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    default:
      ERROR("Invalid audio format: 0x%x", common->cfg.format);
      return -1;
+10 −10
Original line number Diff line number Diff line
@@ -651,7 +651,7 @@ void bta_hh_handsk_act(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data) {
    /* GET_ transsaction, handshake indicate unsupported request */
    case BTA_HH_GET_PROTO_EVT:
      bta_hh.hs_data.rsp_data.proto_mode = BTA_HH_PROTO_UNKNOWN;
    /* fall through */
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    case BTA_HH_GET_RPT_EVT:
    case BTA_HH_GET_IDLE_EVT:
      bta_hh.hs_data.handle = p_cb->hid_handle;
@@ -748,11 +748,11 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data) {
      break;
    /* should not expect control DATA for SET_ transaction */
    case BTA_HH_SET_PROTO_EVT:
    /* fall through */
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    case BTA_HH_SET_RPT_EVT:
    /* fall through */
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    case BTA_HH_SET_IDLE_EVT:
    /* fall through */
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    default:
#if (BTA_HH_DEBUG == TRUE)
      APPL_TRACE_DEBUG("invalid  transaction type for DATA payload: 4_evt[%s]",
@@ -1054,21 +1054,21 @@ void bta_hh_write_dev_act(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data) {
    } else {
      switch (p_data->api_sndcmd.t_type) {
        case HID_TRANS_SET_PROTOCOL:
        /* fall through */
          FALLTHROUGH_INTENDED; /* FALLTHROUGH */
        case HID_TRANS_GET_REPORT:
        /* fall through */
          FALLTHROUGH_INTENDED; /* FALLTHROUGH */
        case HID_TRANS_SET_REPORT:
        /* fall through */
          FALLTHROUGH_INTENDED; /* FALLTHROUGH */
        case HID_TRANS_GET_PROTOCOL:
        /* fall through */
          FALLTHROUGH_INTENDED; /* FALLTHROUGH */
        case HID_TRANS_GET_IDLE:
        /* fall through */
          FALLTHROUGH_INTENDED;  /* FALLTHROUGH */
        case HID_TRANS_SET_IDLE: /* set w4_handsk event name for callback
                                    function use */
          p_cb->w4_evt = event;
          break;
        case HID_TRANS_DATA: /* output report */
                             /* fall through */
          FALLTHROUGH_INTENDED; /* FALLTHROUGH */
        case HID_TRANS_CONTROL:
          /* no handshake event will be generated */
          /* if VC_UNPLUG is issued, set flag */
+1 −1
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ static void write_rpt_ctl_cfg_cb(uint16_t conn_id, tGATT_STATUS status,
    case GATT_UUID_BATTERY_LEVEL: /* battery level clt cfg registered */
      hid_inst_id = bta_hh_le_find_service_inst_by_battery_inst_id(
          p_dev_cb, srvc_inst_id);
    /* FALLTHROUGH */
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    case GATT_UUID_HID_BT_KB_INPUT:
    case GATT_UUID_HID_BT_MOUSE_INPUT:
    case GATT_UUID_HID_REPORT:
+3 −3
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static size_t btsnoop_calculate_packet_length(uint16_t type,
    case BT_EVT_TO_BTU_HCI_SCO:
      // We're not logging SCO packets at this time since they are not currently
      // used.
    // FALLTHROUGH
      FALLTHROUGH_INTENDED; /* FALLTHROUGH */
    default:
      return 0;
  }
Loading