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/score/interr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/include/rtems/score/interr.h') diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h index 1371e55653..85767d0bc5 100644 --- a/cpukit/include/rtems/score/interr.h +++ b/cpukit/include/rtems/score/interr.h @@ -261,10 +261,10 @@ extern Internal_errors_Information _Internal_errors_What_happened; * * @see rtems_fatal() and _Internal_error(). */ -void _Terminate( +RTEMS_NO_RETURN void _Terminate( Internal_errors_Source the_source, Internal_errors_t the_error -) RTEMS_NO_RETURN; +); /** * @brief Terminates the system with an INTERNAL_ERROR_CORE fatal source and @@ -274,7 +274,7 @@ void _Terminate( * * @see _Terminate(). */ -void _Internal_error( Internal_errors_Core_list core_error ) RTEMS_NO_RETURN; +RTEMS_NO_RETURN void _Internal_error( Internal_errors_Core_list core_error ); #ifdef __cplusplus } -- cgit v1.2.3