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/score/cpu/i386/include/rtems/score/cpu.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cpukit/score/cpu/i386') diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h index 632bf5ff38..0cb4590087 100644 --- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h @@ -496,8 +496,7 @@ void _CPU_Context_Initialize( * + disable interrupts and halt the CPU */ -extern 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 ); #endif /* ASM */ @@ -582,9 +581,7 @@ void _CPU_Context_switch( * efficient manner and avoid stack conflicts. */ -void _CPU_Context_restore( - Context_Control *new_context -) RTEMS_NO_RETURN; +RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context ); /* * _CPU_Context_save_fp -- cgit v1.2.3