* [PATCH v2] Add more rules to docs/misra/rules.rst
@ 2023-01-27 18:35 Stefano Stabellini
2023-01-30 8:25 ` Jan Beulich
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Stabellini @ 2023-01-27 18:35 UTC (permalink / raw)
To: xen-devel
Cc: sstabellini, george.dunlap, andrew.cooper3, jbeulich, roger.pau,
Bertrand.Marquis, julien, stefano.stabellini
From: Stefano Stabellini <stefano.stabellini@amd.com>
As agreed during the last MISRA C discussion, I am adding the following
MISRA C rules: 7.1, 7.3, 18.3.
I am also adding 13.1 that was "agreed pending an analysis on the amount
of violations". There are zero violations reported by cppcheck.
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
Changes in v2:
- remove 18.2
---
docs/misra/rules.rst | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index dcceab9388..83f01462f7 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -138,6 +138,16 @@ existing codebase are work-in-progress.
- Single-bit named bit fields shall not be of a signed type
-
+ * - `Rule 7.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_01.c>`_
+ - Required
+ - Octal constants shall not be used
+ -
+
+ * - `Rule 7.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_03.c>`_
+ - Required
+ - The lowercase character l shall not be used in a literal suffix
+ -
+
* - `Rule 8.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_01.c>`_
- Required
- Types shall be explicitly specified
@@ -200,6 +210,11 @@ existing codebase are work-in-progress.
expression which has potential side effects
-
+ * - `Rule 13.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_01_1.c>`_
+ - Required
+ - Initializer lists shall not contain persistent side effects
+ -
+
* - `Rule 14.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_01.c>`_
- Required
- A loop counter shall not have essentially floating type
@@ -227,6 +242,11 @@ existing codebase are work-in-progress.
static keyword between the [ ]
-
+ * - `Rule 18.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_03.c>`_
+ - Required
+ - The relational operators > >= < and <= shall not be applied to objects of pointer type except where they point into the same object
+ -
+
* - `Rule 19.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_19_01.c>`_
- Mandatory
- An object shall not be assigned or copied to an overlapping
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Add more rules to docs/misra/rules.rst
2023-01-27 18:35 [PATCH v2] Add more rules to docs/misra/rules.rst Stefano Stabellini
@ 2023-01-30 8:25 ` Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2023-01-30 8:25 UTC (permalink / raw)
To: Stefano Stabellini
Cc: george.dunlap, andrew.cooper3, roger.pau, Bertrand.Marquis,
julien, stefano.stabellini, xen-devel
On 27.01.2023 19:35, Stefano Stabellini wrote:
> From: Stefano Stabellini <stefano.stabellini@amd.com>
>
> As agreed during the last MISRA C discussion, I am adding the following
> MISRA C rules: 7.1, 7.3, 18.3.
>
> I am also adding 13.1 that was "agreed pending an analysis on the amount
> of violations". There are zero violations reported by cppcheck.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-30 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 18:35 [PATCH v2] Add more rules to docs/misra/rules.rst Stefano Stabellini
2023-01-30 8:25 ` Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.