diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-06 07:39:44 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-10 14:00:37 +0200 |
commit | d7a48e1b259316533a5c775e27934760e1fcd313 (patch) | |
tree | ba60f54f4647a8d866395450183ef2551bf9d46d /cpukit/score/cpu/nios2/include/rtems/score | |
parent | e1a0e0c30829a0da4174085ee5109fba337dba11 (diff) |
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.
Diffstat (limited to 'cpukit/score/cpu/nios2/include/rtems/score')
-rw-r--r-- | cpukit/score/cpu/nios2/include/rtems/score/cpu.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cpukit/score/cpu/nios2/include/rtems/score/cpu.h b/cpukit/score/cpu/nios2/include/rtems/score/cpu.h index 5528561d1c..5fffed646e 100644 --- a/cpukit/score/cpu/nios2/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/nios2/include/rtems/score/cpu.h @@ -290,8 +290,7 @@ void _CPU_Context_Initialize( #define _CPU_Context_Restart_self( _the_context ) \ _CPU_Context_restore( (_the_context) ); -void _CPU_Fatal_halt( uint32_t _source, uint32_t _error ) - RTEMS_NO_RETURN; +RTEMS_NO_RETURN void _CPU_Fatal_halt( uint32_t _source, uint32_t _error ); /** * @brief CPU initialization. @@ -310,9 +309,7 @@ void *_CPU_Thread_Idle_body( uintptr_t ignored ); void _CPU_Context_switch( Context_Control *run, Context_Control *heir ); -void _CPU_Context_restore( - Context_Control *new_context -) RTEMS_NO_RETURN; +RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context ); void _CPU_Exception_frame_print( const CPU_Exception_frame *frame ); |