|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH] automation/eclair: add deviation for MISRA C Rule 17.7
Update ECLAIR configuration to deviate some cases where not using
the return value of a function is not dangerous.
Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
---
automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++
docs/misra/deviations.rst | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl
b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 447c1e6661..7bae804569 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -413,6 +413,10 @@ explicit comment indicating the fallthrough intention is
present."
-config=MC3R1.R17.1,macros+={hide , "^va_(arg|start|copy|end)$"}
-doc_end
+-doc_begin="Not using the return value of a function do not endanger safety if
it coincides with the first actual argument."
+-config=MC3R1.R17.7,calls+={safe, "any()",
"decl(name(__builtin_memcpy||__builtin_memmove||__builtin_memset||cpumask_check||strlcat||strlcpy))"}
+-doc_end
+
#
# Series 18.
#
diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
index 36959aa44a..0bbac3cb9a 100644
--- a/docs/misra/deviations.rst
+++ b/docs/misra/deviations.rst
@@ -364,6 +364,17 @@ Deviations related to MISRA C:2012 Rules:
by `stdarg.h`.
- Tagged as `deliberate` for ECLAIR.
+ * - R17.7
+ - Not using the return value of a function do not endanger safety if it
+ coincides with the first actual argument.
+ - Tagged as `safe` for ECLAIR. Such functions are:
+ - __builtin_memcpy()
+ - __builtin_memmove()
+ - __builtin_memset()
+ - __cpumask_check()
+ - strlcat()
+ - strlcpy()
+
* - R20.4
- The override of the keyword \"inline\" in xen/compiler.h is present so
that section contents checks pass when the compiler chooses not to
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |