diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-01-29 07:07:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-01 14:19:28 +0100 |
commit | 490e6e8809e296cbc6d6358e1382f4f8776ca4bb (patch) | |
tree | ac938ed9603e1625ed9592027e1815053ea1d534 /cpukit/include/rtems/score/basedefs.h | |
parent | libtest: Remove double definition (diff) | |
download | rtems-490e6e8809e296cbc6d6358e1382f4f8776ca4bb.tar.bz2 |
score: Define _Assert() for static analysis runs
The goal is to reduce false positive NULL_RETURNS,
PW.NORETURN_FUNCTION_DOES_RETURN, PW.SET_BUT_NOT_USED,
UNUSED_VALUE, etc. issues produced by Coverity.
Define RTEMS_STATIC_ANALYSIS if a static analysis run by Coverity is
performed.
Diffstat (limited to 'cpukit/include/rtems/score/basedefs.h')
-rw-r--r-- | cpukit/include/rtems/score/basedefs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h index a98b80f0dd..fe5f4ab7c7 100644 --- a/cpukit/include/rtems/score/basedefs.h +++ b/cpukit/include/rtems/score/basedefs.h @@ -748,6 +748,17 @@ extern "C" { #define RTEMS_SECTION( _section ) #endif +/* Generated from spec:/rtems/basedefs/if/static-analysis */ + +/** + * @ingroup RTEMSAPIBaseDefs + * + * @brief It is defined if a static analysis run is performed. + */ +#if defined(__COVERITY__) + #define RTEMS_STATIC_ANALYSIS +#endif + /* Generated from spec:/rtems/basedefs/if/static-assert */ /** |