diff --git a/components/bootloader_support/private_include/bootloader_utility.h b/components/bootloader_support/private_include/bootloader_utility.h index e072d7d76a..77d4a9eee0 100644 --- a/components/bootloader_support/private_include/bootloader_utility.h +++ b/components/bootloader_support/private_include/bootloader_utility.h @@ -45,7 +45,7 @@ int bootloader_utility_get_selected_boot_partition(const bootloader_state_t *bs) * @param[in] bs Bootloader state structure. * @param[in] start_index The index from which the search for images begins. */ -__attribute__((noreturn)) void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_index); +__attribute__((__noreturn__)) void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_index); #ifdef CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP /** @@ -65,7 +65,7 @@ void bootloader_utility_load_boot_image_from_deep_sleep(void); * * It is not recommended to call this function from an app (if called, the app will abort). */ -__attribute__((noreturn)) void bootloader_reset(void); +__attribute__((__noreturn__)) void bootloader_reset(void); /** * @brief Do any cleanup before exiting the bootloader, before starting the app or resetting diff --git a/components/esp_common/include/esp_err.h b/components/esp_common/include/esp_err.h index 34e69d3c0d..d6b2e301d2 100644 --- a/components/esp_common/include/esp_err.h +++ b/components/esp_common/include/esp_err.h @@ -76,7 +76,7 @@ const char *esp_err_to_name(esp_err_t code); const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen); /** @cond */ -void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const char *function, const char *expression) __attribute__((noreturn)); +void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const char *function, const char *expression) __attribute__((__noreturn__)); /** @cond */ void _esp_error_check_failed_without_abort(esp_err_t rc, const char *file, int line, const char *function, const char *expression); diff --git a/components/esp_hw_support/include/esp_sleep.h b/components/esp_hw_support/include/esp_sleep.h index a632af4b37..27549d8edb 100644 --- a/components/esp_hw_support/include/esp_sleep.h +++ b/components/esp_hw_support/include/esp_sleep.h @@ -417,7 +417,7 @@ esp_err_t esp_sleep_pd_config(esp_sleep_pd_domain_t domain, * * This function does not return. */ -void esp_deep_sleep_start(void) __attribute__((noreturn)); +void esp_deep_sleep_start(void) __attribute__((__noreturn__)); /** * @brief Enter light sleep with the configured wakeup options @@ -455,7 +455,7 @@ esp_err_t esp_light_sleep_start(void); * * @param time_in_us deep-sleep time, unit: microsecond */ -void esp_deep_sleep(uint64_t time_in_us) __attribute__((noreturn)); +void esp_deep_sleep(uint64_t time_in_us) __attribute__((__noreturn__)); /** diff --git a/components/esp_rom/include/esp32/rom/rtc.h b/components/esp_rom/include/esp32/rom/rtc.h index 66608bb181..101b4bf56b 100644 --- a/components/esp_rom/include/esp32/rom/rtc.h +++ b/components/esp_rom/include/esp32/rom/rtc.h @@ -217,7 +217,7 @@ static inline void rtc_suppress_rom_log(void) * * @return None */ -void __attribute__((noreturn)) software_reset(void); +void __attribute__((__noreturn__)) software_reset(void); /** * @brief Software Reset digital core. diff --git a/components/esp_rom/include/esp32c2/rom/libc_stubs.h b/components/esp_rom/include/esp32c2/rom/libc_stubs.h index 94992b0457..eb31357fc2 100644 --- a/components/esp_rom/include/esp32c2/rom/libc_stubs.h +++ b/components/esp_rom/include/esp32c2/rom/libc_stubs.h @@ -69,7 +69,7 @@ struct syscall_stub_table void (*_retarget_lock_release_recursive)(_LOCK_T lock); int (*_printf_float)(struct _reent *data, void *pdata, FILE * fp, int (*pfunc) (struct _reent *, FILE *, const char *, size_t len), va_list * ap); int (*_scanf_float) (struct _reent *rptr, void *pdata, FILE *fp, va_list *ap); - void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((noreturn)); + void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((__noreturn__)); void (*__sinit) (struct _reent *r); void (*_cleanup_r) (struct _reent* r); }; diff --git a/components/esp_rom/include/esp32c3/rom/libc_stubs.h b/components/esp_rom/include/esp32c3/rom/libc_stubs.h index 233355e9c2..7008b48794 100644 --- a/components/esp_rom/include/esp32c3/rom/libc_stubs.h +++ b/components/esp_rom/include/esp32c3/rom/libc_stubs.h @@ -1,16 +1,8 @@ -// Copyright 2020 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: 2020-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ROM_LIBC_STUBS_H_ #define _ROM_LIBC_STUBS_H_ @@ -77,7 +69,7 @@ struct syscall_stub_table void (*_retarget_lock_release_recursive)(_LOCK_T lock); int (*_printf_float)(struct _reent *data, void *pdata, FILE * fp, int (*pfunc) (struct _reent *, FILE *, const char *, size_t len), va_list * ap); int (*_scanf_float) (struct _reent *rptr, void *pdata, FILE *fp, va_list *ap); - void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((noreturn)); + void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((__noreturn__)); void (*__sinit) (struct _reent *r); void (*_cleanup_r) (struct _reent* r); }; diff --git a/components/esp_rom/include/esp32c6/rom/libc_stubs.h b/components/esp_rom/include/esp32c6/rom/libc_stubs.h index 1ccc11f86a..494a70e867 100644 --- a/components/esp_rom/include/esp32c6/rom/libc_stubs.h +++ b/components/esp_rom/include/esp32c6/rom/libc_stubs.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -68,7 +68,7 @@ struct syscall_stub_table { void (*_retarget_lock_release_recursive)(_LOCK_T lock); int (*_printf_float)(struct _reent *data, void *pdata, FILE *fp, int (*pfunc) (struct _reent *, FILE *, const char *, size_t len), va_list *ap); int (*_scanf_float) (struct _reent *rptr, void *pdata, FILE *fp, va_list *ap); - void (*__assert_func) (const char *file, int line, const char *func, const char *failedexpr) __attribute__((noreturn)); + void (*__assert_func) (const char *file, int line, const char *func, const char *failedexpr) __attribute__((__noreturn__)); void (*__sinit) (struct _reent *r); void (*_cleanup_r) (struct _reent *r); }; diff --git a/components/esp_rom/include/esp32h2/rom/libc_stubs.h b/components/esp_rom/include/esp32h2/rom/libc_stubs.h index 6e2e326260..b7e28e5caf 100644 --- a/components/esp_rom/include/esp32h2/rom/libc_stubs.h +++ b/components/esp_rom/include/esp32h2/rom/libc_stubs.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -69,7 +69,7 @@ struct syscall_stub_table void (*_retarget_lock_release_recursive)(_LOCK_T lock); int (*_printf_float)(struct _reent *data, void *pdata, FILE * fp, int (*pfunc) (struct _reent *, FILE *, const char *, size_t len), va_list * ap); int (*_scanf_float) (struct _reent *rptr, void *pdata, FILE *fp, va_list *ap); - void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((noreturn)); + void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((__noreturn__)); void (*__sinit) (struct _reent *r); void (*_cleanup_r) (struct _reent* r); }; diff --git a/components/esp_rom/include/esp32s3/rom/libc_stubs.h b/components/esp_rom/include/esp32s3/rom/libc_stubs.h index 1298eeda55..47050b543e 100644 --- a/components/esp_rom/include/esp32s3/rom/libc_stubs.h +++ b/components/esp_rom/include/esp32s3/rom/libc_stubs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 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: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -78,7 +70,7 @@ struct syscall_stub_table void (*_retarget_lock_release_recursive)(_LOCK_T lock); int (*_printf_float)(struct _reent *data, void *pdata, FILE * fp, int (*pfunc) (struct _reent *, FILE *, const char *, size_t len), va_list * ap); int (*_scanf_float) (struct _reent *rptr, void *pdata, FILE *fp, va_list *ap); - void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((noreturn)); + void (*__assert_func) (const char *file, int line, const char * func, const char *failedexpr) __attribute__((__noreturn__)); void (*__sinit) (struct _reent *r); void (*_cleanup_r) (struct _reent* r); }; diff --git a/components/esp_system/include/esp_private/panic_internal.h b/components/esp_system/include/esp_private/panic_internal.h index d43a705aba..bdf8a26420 100644 --- a/components/esp_system/include/esp_private/panic_internal.h +++ b/components/esp_system/include/esp_private/panic_internal.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 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: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -76,7 +68,7 @@ void panic_print_hex(int h); #define panic_print_hex(h) #endif -void __attribute__((noreturn)) panic_abort(const char *details); +void __attribute__((__noreturn__)) panic_abort(const char *details); void panic_arch_fill_info(void *frame, panic_info_t *info); diff --git a/components/esp_system/include/esp_system.h b/components/esp_system/include/esp_system.h index fea13af97d..f3ee93c002 100644 --- a/components/esp_system/include/esp_system.h +++ b/components/esp_system/include/esp_system.h @@ -72,7 +72,7 @@ esp_err_t esp_unregister_shutdown_handler(shutdown_handler_t handle); * Peripherals (except for Wi-Fi, BT, UART0, SPI1, and legacy timers) are not reset. * This function does not return. */ -void esp_restart(void) __attribute__ ((noreturn)); +void esp_restart(void) __attribute__ ((__noreturn__)); /** * @brief Get reason of last reset @@ -112,7 +112,7 @@ uint32_t esp_get_minimum_free_heap_size( void ); * * @param details Details that will be displayed during panic handling. */ -void __attribute__((noreturn)) esp_system_abort(const char* details); +void __attribute__((__noreturn__)) esp_system_abort(const char* details); #ifdef __cplusplus } diff --git a/components/esp_system/port/include/port/panic_funcs.h b/components/esp_system/port/include/port/panic_funcs.h index c2b4280051..9c317f9ce4 100644 --- a/components/esp_system/port/include/port/panic_funcs.h +++ b/components/esp_system/port/include/port/panic_funcs.h @@ -10,7 +10,7 @@ extern "C" { #endif -void __attribute__((noreturn)) panic_restart(void); +void __attribute__((__noreturn__)) panic_restart(void); #ifdef __cplusplus } diff --git a/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h b/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h index 00e93b40e5..560baff162 100644 --- a/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h +++ b/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h @@ -46,7 +46,7 @@ void ulp_lp_core_delay_us(uint32_t us); * before halting. * */ -__attribute__((noreturn)) void ulp_lp_core_halt(void); +__attribute__((__noreturn__)) void ulp_lp_core_halt(void); #ifdef __cplusplus } diff --git a/components/ulp/ulp_riscv/ulp_core/include/ulp_riscv_utils.h b/components/ulp/ulp_riscv/ulp_core/include/ulp_riscv_utils.h index d73bb5ca1b..c4e89b9906 100644 --- a/components/ulp/ulp_riscv/ulp_core/include/ulp_riscv_utils.h +++ b/components/ulp/ulp_riscv/ulp_core/include/ulp_riscv_utils.h @@ -54,7 +54,7 @@ void ulp_riscv_rescue_from_monitor(void); * put the ULP in monitor mode and triggers a reset. * */ -void __attribute__((noreturn)) ulp_riscv_halt(void); +void __attribute__((__noreturn__)) ulp_riscv_halt(void); #define ulp_riscv_shutdown ulp_riscv_halt diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 23931a3a7b..13c4584a68 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -486,7 +486,6 @@ components/esp_rom/include/esp32c3/rom/crc.h components/esp_rom/include/esp32c3/rom/digital_signature.h components/esp_rom/include/esp32c3/rom/esp_flash.h components/esp_rom/include/esp32c3/rom/hmac.h -components/esp_rom/include/esp32c3/rom/libc_stubs.h components/esp_rom/include/esp32c3/rom/rom_layout.h components/esp_rom/include/esp32c3/rom/rsa_pss.h components/esp_rom/include/esp32c3/rom/sha.h @@ -515,7 +514,6 @@ components/esp_rom/include/esp32s3/rom/bigint.h components/esp_rom/include/esp32s3/rom/crc.h components/esp_rom/include/esp32s3/rom/digital_signature.h components/esp_rom/include/esp32s3/rom/hmac.h -components/esp_rom/include/esp32s3/rom/libc_stubs.h components/esp_rom/include/esp32s3/rom/opi_flash.h components/esp_rom/include/esp32s3/rom/rom_layout.h components/esp_rom/include/esp32s3/rom/rsa_pss.h @@ -555,7 +553,6 @@ components/esp_system/include/esp_expression_with_stack.h components/esp_system/include/esp_freertos_hooks.h components/esp_system/include/esp_int_wdt.h components/esp_system/include/esp_private/dbg_stubs.h -components/esp_system/include/esp_private/panic_internal.h components/esp_system/port/public_compat/brownout.h components/esp_system/port/public_compat/cache_err_int.h components/esp_system/port/public_compat/trax.h