diff --git a/components/esp_timer/src/esp_timer.c b/components/esp_timer/src/esp_timer.c index 86b279de76..d9c0da4364 100644 --- a/components/esp_timer/src/esp_timer.c +++ b/components/esp_timer/src/esp_timer.c @@ -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) { diff --git a/components/protocomm/src/transports/protocomm_httpd.c b/components/protocomm/src/transports/protocomm_httpd.c index 535f5cf851..ffb0d39d1c 100644 --- a/components/protocomm/src/transports/protocomm_httpd.c +++ b/components/protocomm/src/transports/protocomm_httpd.c @@ -1,16 +1,8 @@ -// Copyright 2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -69,7 +61,6 @@ static esp_err_t common_post_handler(httpd_req_t *req) */ if (strcmp(session_cookie, cookie_buf) == 0) { ESP_LOGD(TAG, "Continuing Session %u", cookie_session_id); - cur_cookie_session_id = cookie_session_id; /* If we reach here, it means that the client supports cookies and so the * socket session id would no more be required for checking. */ @@ -79,7 +70,6 @@ static esp_err_t common_post_handler(httpd_req_t *req) } else if (cur_sock_session_id == sock_session_id) { /* If the socket number matches, we assume it to be the same session */ ESP_LOGD(TAG, "Continuing Socket Session %u", sock_session_id); - cur_cookie_session_id = cookie_session_id; same_session = true; } if (!same_session) { diff --git a/components/spi_flash/esp_flash_api.c b/components/spi_flash/esp_flash_api.c index 7d0489a913..7b0719c277 100644 --- a/components/spi_flash/esp_flash_api.c +++ b/components/spi_flash/esp_flash_api.c @@ -265,12 +265,14 @@ esp_err_t IRAM_ATTR esp_flash_init_main(esp_flash_t *chip) // 3. Get basic parameters of the chip (size, dummy count, etc.) // 4. Init chip into desired mode (without breaking the cache!) esp_err_t err = ESP_OK; - bool octal_mode = (chip->read_mode >= SPI_FLASH_OPI_FLAG); + bool octal_mode; + if (chip == NULL || chip->host == NULL || chip->host->driver == NULL || ((memspi_host_inst_t*)chip->host)->spi == NULL) { return ESP_ERR_INVALID_ARG; } + octal_mode = (chip->read_mode >= SPI_FLASH_OPI_FLAG); //read chip id // This can indicate the MSPI support OPI, if the flash works on MSPI in OPI mode, we directly bypass read id. uint32_t flash_id = 0; diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index f9120d9d0a..41274ca3ec 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1707,7 +1707,6 @@ components/protocomm/src/common/protocomm_priv.h components/protocomm/src/security/security0.c components/protocomm/src/security/security1.c components/protocomm/src/transports/protocomm_console.c -components/protocomm/src/transports/protocomm_httpd.c components/protocomm/test/test_protocomm.c components/pthread/include/esp_pthread.h components/pthread/pthread_cond_var.c