Merge branch 'bugfix/use_safe_noreturn_attr_v5.1' into 'release/v5.1'

compiler: replaced noreturn by __noreturn__ in header files (v5.1)

See merge request espressif/esp-idf!23811
This commit is contained in:
Marius Vikhammer 2023-05-19 09:37:50 +08:00
commit 19f300fa24
15 changed files with 34 additions and 61 deletions

View File

@ -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

View File

@ -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);

View File

@ -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__));
/**

View File

@ -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.

View File

@ -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);
};

View File

@ -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);
};

View File

@ -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);
};

View File

@ -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);
};

View File

@ -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);
};

View File

@ -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);

View File

@ -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
}

View File

@ -10,7 +10,7 @@
extern "C" {
#endif
void __attribute__((noreturn)) panic_restart(void);
void __attribute__((__noreturn__)) panic_restart(void);
#ifdef __cplusplus
}

View File

@ -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
}

View File

@ -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

View File

@ -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