mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-17 07:49:31 +01:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user