<div dir="ltr">Thanks, I like that.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 31, 2021 at 11:07 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The goal is to reduce false positive NULL_RETURNS,<br>
PW.NORETURN_FUNCTION_DOES_RETURN, PW.SET_BUT_NOT_USED,<br>
UNUSED_VALUE, etc. issues produced by Coverity.<br>
<br>
Define RTEMS_STATIC_ANALYSIS if a static analysis run by Coverity is<br>
performed.<br>
---<br>
 cpukit/include/rtems/score/assert.h   |  4 ++--<br>
 cpukit/include/rtems/score/basedefs.h | 11 +++++++++++<br>
 2 files changed, 13 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/cpukit/include/rtems/score/assert.h b/cpukit/include/rtems/score/assert.h<br>
index 2bf1703f19..cc3244844c 100644<br>
--- a/cpukit/include/rtems/score/assert.h<br>
+++ b/cpukit/include/rtems/score/assert.h<br>
@@ -46,9 +46,9 @@ extern "C" {<br>
<br>
 /**<br>
  * @brief Assertion similar to assert() controlled via RTEMS_DEBUG instead of<br>
- * NDEBUG.<br>
+ *   NDEBUG and static analysis runs.<br>
  */<br>
-#if defined( RTEMS_DEBUG )<br>
+#if defined( RTEMS_DEBUG ) || defined( RTEMS_STATIC_ANALYSIS )<br>
<br>
   /**<br>
    * @brief Macro with method name used in assert output<br>
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h<br>
index a98b80f0dd..fe5f4ab7c7 100644<br>
--- a/cpukit/include/rtems/score/basedefs.h<br>
+++ b/cpukit/include/rtems/score/basedefs.h<br>
@@ -748,6 +748,17 @@ extern "C" {<br>
   #define RTEMS_SECTION( _section )<br>
 #endif<br>
<br>
+/* Generated from spec:/rtems/basedefs/if/static-analysis */<br>
+<br>
+/**<br>
+ * @ingroup RTEMSAPIBaseDefs<br>
+ *<br>
+ * @brief It is defined if a static analysis run is performed.<br>
+ */<br>
+#if defined(__COVERITY__)<br>
+  #define RTEMS_STATIC_ANALYSIS<br>
+#endif<br>
+<br>
 /* Generated from spec:/rtems/basedefs/if/static-assert */<br>
<br>
 /**<br>
-- <br>
2.26.2<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>