summaryrefslogtreecommitdiff
path: root/cpukit/include/rtems/fatal.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-06 07:39:44 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-10 14:00:37 +0200
commitd7a48e1b259316533a5c775e27934760e1fcd313 (patch)
treeba60f54f4647a8d866395450183ef2551bf9d46d /cpukit/include/rtems/fatal.h
parente1a0e0c30829a0da4174085ee5109fba337dba11 (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/include/rtems/fatal.h')
-rw-r--r--cpukit/include/rtems/fatal.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/cpukit/include/rtems/fatal.h b/cpukit/include/rtems/fatal.h
index 3fc6a89a78..228e7462e0 100644
--- a/cpukit/include/rtems/fatal.h
+++ b/cpukit/include/rtems/fatal.h
@@ -16,7 +16,7 @@
#ifndef _RTEMS_FATAL_H
#define _RTEMS_FATAL_H
-#include <rtems/score/basedefs.h> /* RTEMS_NO_RETURN */
+#include <rtems/score/basedefs.h>
#include <rtems/extension.h>
#ifdef __cplusplus
@@ -68,9 +68,7 @@ static inline void rtems_exception_frame_print(
*
* @see _Terminate().
*/
-void rtems_fatal_error_occurred(
- uint32_t the_error
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t the_error );
/**
* @brief Terminates the system.