Skip to content

Commit

Permalink
Service: Silence fallthrough warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sU8U7SfkcwTJVH7PjaVmej7D authored and jason-mao committed Aug 13, 2021
1 parent 57d0737 commit fea3167
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/battery_service/battery_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ static void battery_task(void *pvParameters)
}
case BATTERY_SERVICE_DESTROY:
service->running = false;
__attribute__((fallthrough));
// No break, to share the actions of case `BATTERY_SERVICE_STOP`, clear all the monitors.
case BATTERY_SERVICE_STOP: {
if (service->vol_monitor != NULL) {
Expand Down Expand Up @@ -310,4 +311,4 @@ esp_err_t battery_service_set_vol_report_freq(periph_service_handle_t handle, in

battery_service_msg_send(service->serv_q, BATTERY_VOL_SET_REPORT_FREQ, (void *)freq);
return ESP_OK;
}
}
1 change: 1 addition & 0 deletions components/ota_service/esp_fs_ota.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ esp_err_t esp_fs_ota_finish(esp_fs_ota_handle_t fs_ota_handle)
case ESP_FS_OTA_SUCCESS:
case ESP_FS_OTA_IN_PROGRESS:
err = esp_ota_end(handle->update_handle);
__attribute__((fallthrough));
case ESP_FS_OTA_BEGIN:
if (handle->ota_upgrade_buf) {
audio_free(handle->ota_upgrade_buf);
Expand Down

0 comments on commit fea3167

Please sign in to comment.