streamline switch fall through markup to /* fall through */

This commit is contained in:
Matthias Ringwald 2020-01-07 10:01:07 +01:00
parent 497cc6820f
commit cf373d3aa5
4 changed files with 19 additions and 13 deletions

View File

@ -330,12 +330,12 @@ static uint8_t att_validate_security(att_connection_t * att_connection, att_oper
if ((att_connection->authorized == 0) || sc_missing){
return ATT_ERROR_INSUFFICIENT_AUTHORIZATION;
}
/* explicit fall through */
/* fall through */
case ATT_SECURITY_AUTHENTICATED:
if ((att_connection->authenticated == 0) || sc_missing){
return ATT_ERROR_INSUFFICIENT_AUTHENTICATION;
}
/* explicit fall through */
/* fall through */
case ATT_SECURITY_ENCRYPTED:
if ((required_encryption_size > 0) && ((att_connection->encryption_key_size == 0) || sc_missing)){
return ATT_ERROR_INSUFFICIENT_ENCRYPTION;

View File

@ -4116,7 +4116,7 @@ void sm_request_pairing(hci_con_handle_t con_handle){
break;
}
#endif
/* explicit fall-through */
/* fall through */
case IRK_LOOKUP_FAILED:
sm_conn->sm_engine_state = SM_INITIATOR_PH1_W2_SEND_PAIRING_REQUEST;

View File

@ -1155,7 +1155,9 @@ static void hci_initialization_timeout_handler(btstack_timer_source_t * ds){
if (hci_stack->hci_transport->reset_link){
hci_stack->hci_transport->reset_link();
}
// no break - explicit fallthrough to HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT
/* fall through */
case HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT:
log_info("Resend HCI Reset - CSR Warm Boot");
hci_stack->substate = HCI_INIT_SEND_RESET_CSR_WARM_BOOT;
@ -1792,19 +1794,22 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
// skip write synchronous flow control if not supported
if (hci_stack->local_supported_commands[0] & 0x04) break;
hci_stack->substate = HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE;
// explicit fall through to reduce repetitions
/* fall through */
case HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE:
// skip write default erroneous data reporting if not supported
if (hci_stack->local_supported_commands[0] & 0x08) break;
hci_stack->substate = HCI_INIT_W4_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING;
// explicit fall through to reduce repetitions
/* fall through */
case HCI_INIT_W4_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING:
// skip bcm set sco pcm config on non-Broadcom chipsets
if (hci_stack->manufacturer == BLUETOOTH_COMPANY_ID_BROADCOM_CORPORATION) break;
hci_stack->substate = HCI_INIT_W4_BCM_WRITE_SCO_PCM_INT;
// explicit fall through to reduce repetitions
/* fall through */
case HCI_INIT_W4_BCM_WRITE_SCO_PCM_INT:
if (!hci_le_supported()){
@ -3826,7 +3831,7 @@ static void hci_run(void){
break;
}
/* explicit fall-through */
/* fall through */
case HCI_HALTING_CLOSE:
log_info("HCI_STATE_HALTING, calling off");
@ -3886,7 +3891,8 @@ static void hci_run(void){
hci_stack->substate = HCI_FALLING_ASLEEP_W4_WRITE_SCAN_ENABLE;
break;
}
// no break - fall through for ble-only chips
/* fall through */
case HCI_FALLING_ASLEEP_COMPLETE:
log_info("HCI_STATE_HALTING, calling sleep");
@ -4207,7 +4213,7 @@ static void gap_inquiry_explode(uint8_t * packet){
switch (data_type){
case BLUETOOTH_DATA_TYPE_SHORTENED_LOCAL_NAME:
if (name) continue;
/* explicit fall-through */
/* fall through */
case BLUETOOTH_DATA_TYPE_COMPLETE_LOCAL_NAME:
name = data;
name_len = data_size;

View File

@ -209,7 +209,7 @@ static void mesh_secure_network_beacon_run(btstack_timer_source_t * ts){
// send new beacon
subnet->beacon_state = MESH_SECURE_NETWORK_BEACON_W2_AUTH_VALUE;
/** Explict Fall-through */
/* fall through */
case MESH_SECURE_NETWORK_BEACON_W2_AUTH_VALUE:
if (mesh_secure_network_beacon_active){
@ -231,7 +231,7 @@ static void mesh_secure_network_beacon_run(btstack_timer_source_t * ts){
#endif
subnet->beacon_state = MESH_SECURE_NETWORK_BEACON_ADV_SENT;
/** Explict Fall-through */
/* fall through */
case MESH_SECURE_NETWORK_BEACON_ADV_SENT:
@ -244,7 +244,7 @@ static void mesh_secure_network_beacon_run(btstack_timer_source_t * ts){
#endif
subnet->beacon_state = MESH_SECURE_NETWORK_BEACON_GATT_SENT;
/** Explict Fall-through */
/* fall through */
case MESH_SECURE_NETWORK_BEACON_GATT_SENT:
// now, start listening for beacons