diff --git a/components/esp_rom/host_test/rom_test/sdkconfig.defaults b/components/esp_rom/host_test/rom_test/sdkconfig.defaults index 89c65632c9..823e419d0c 100644 --- a/components/esp_rom/host_test/rom_test/sdkconfig.defaults +++ b/components/esp_rom/host_test/rom_test/sdkconfig.defaults @@ -1,3 +1,4 @@ CONFIG_IDF_TARGET="linux" CONFIG_COMPILER_CXX_EXCEPTIONS=y CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n +CONFIG_COMPILER_WARN_WRITE_STRINGS=y diff --git a/components/esp_rom/linux/esp_rom_sys.c b/components/esp_rom/linux/esp_rom_sys.c index 026e195cfe..515e67209e 100644 --- a/components/esp_rom/linux/esp_rom_sys.c +++ b/components/esp_rom/linux/esp_rom_sys.c @@ -1,16 +1,8 @@ -// Copyright 2021 Espressif Systems (Shanghai) CO 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: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -30,7 +22,7 @@ static void call_linux_putc(char c) { #define is_digit(c) ((c >= '0') && (c <= '9')) -static int _cvt(unsigned long long val, char *buf, long radix, char *digits) +static int _cvt(unsigned long long val, char *buf, long radix, const char *digits) { #ifdef SUPPORT_LITTLE_RADIX char temp[64]; @@ -65,7 +57,8 @@ static int esp_rom_vprintf(void (*putc)(char c), const char *fmt, va_list ap) #else char buf[32]; #endif - char c, sign, *cp=buf; + char c, sign; + const char *cp = buf; int left_prec, right_prec, zero_fill, pad, pad_on_right, islong, islonglong; long long val = 0; diff --git a/components/log/host_test/log_test/sdkconfig.defaults b/components/log/host_test/log_test/sdkconfig.defaults index a35fc5148f..3a1006ce0f 100644 --- a/components/log/host_test/log_test/sdkconfig.defaults +++ b/components/log/host_test/log_test/sdkconfig.defaults @@ -1,5 +1,6 @@ CONFIG_IDF_TARGET="linux" CONFIG_COMPILER_CXX_EXCEPTIONS=y +CONFIG_COMPILER_WARN_WRITE_STRINGS=y CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y CONFIG_LOG_DEFAULT_LEVEL=5 diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index ca2c0e4385..eceda4bfaa 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -588,7 +588,6 @@ components/esp_rom/include/esp_rom_uart.h components/esp_rom/include/linux/soc/reset_reasons.h components/esp_rom/linux/esp_rom_crc.c components/esp_rom/linux/esp_rom_md5.c -components/esp_rom/linux/esp_rom_sys.c components/esp_rom/patches/esp_rom_crc.c components/esp_rom/patches/esp_rom_tjpgd.c components/esp_rom/test/test_libgcc.c