From d7a48e1b259316533a5c775e27934760e1fcd313 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 6 Oct 2020 07:39:44 +0200 Subject: rtems: Improve RTEMS_NO_RETURN attribute Provide RTEMS_NO_RETURN also in case RTEMS_DEBUG is defined to prevent errors like this: error: no return statement in function returning non-void [-Werror=return-type] Use C11 and C++11 standard means to declare a no-return function. Close #4122. --- cpukit/include/rtems/init.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cpukit/include/rtems/init.h') diff --git a/cpukit/include/rtems/init.h b/cpukit/include/rtems/init.h index 86b1408d64..552017f0de 100644 --- a/cpukit/include/rtems/init.h +++ b/cpukit/include/rtems/init.h @@ -46,8 +46,7 @@ extern "C" { * * This directive does not return. */ -void rtems_initialize_executive(void) - RTEMS_NO_RETURN; +RTEMS_NO_RETURN void rtems_initialize_executive( void ); /** * @brief Shutdown the RTEMS environment. @@ -57,9 +56,7 @@ void rtems_initialize_executive(void) * shutdown and multitasking halted. The system is terminated with a fatal * source of RTEMS_FATAL_SOURCE_EXIT and the specified result code. */ -void rtems_shutdown_executive( - uint32_t result -) RTEMS_NO_RETURN; +RTEMS_NO_RETURN void rtems_shutdown_executive( uint32_t result ); #ifdef __cplusplus } -- cgit v1.2.3