Fix various warnings generated from Coverity scan

esp_timer:
Control flow issues  (DEADCODE)
    Execution cannot reach this statement: "break;".

protocomm_httpd:
(UNUSED_VALUE)
    Assigning value from "cookie_session_id" to "cur_cookie_session_id" here, but that stored value is overwritten before it can be used.

esp_flash_api:
Null pointer dereferences  (REVERSE_INULL)
    Null-checking "chip" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
This commit is contained in:
Mahavir Jain
2021-12-07 13:21:08 +05:30
parent 13978c9556
commit 203f82cc49
4 changed files with 9 additions and 21 deletions

View File

@@ -605,11 +605,8 @@ int64_t IRAM_ATTR esp_timer_get_next_alarm_for_wake_up(void)
int64_t next_alarm = INT64_MAX;
for (esp_timer_dispatch_t dispatch_method = ESP_TIMER_TASK; dispatch_method < ESP_TIMER_MAX; ++dispatch_method) {
timer_list_lock(dispatch_method);
esp_timer_handle_t it;
esp_timer_handle_t it = NULL;
LIST_FOREACH(it, &s_timers[dispatch_method], list_entry) {
if (it == NULL) {
break;
}
// timers with the SKIP_UNHANDLED_EVENTS flag do not want to wake up CPU from a sleep mode.
if ((it->flags & FL_SKIP_UNHANDLED_EVENTS) == 0) {
if (next_alarm > it->alarm) {