[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] docs/misra: add Rule 7.4 and 9.4
From: Stefano Stabellini <stefano.stabellini@xxxxxxx> Rule 9.4 is non-controversial and we have no violations. Rule 7.4 is considered a good idea with the caveat that assigning a string literal to const void is allowed. I added a note to specify it. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx> --- docs/misra/rules.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 622f35410c..986d031786 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -203,6 +203,13 @@ maintainers if you want to suggest a change. - The lowercase character l shall not be used in a literal suffix - + * - `Rule 7.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_04.c>`_ + - Required + - A string literal shall not be assigned to an object unless the + objects type is pointer to const-qualified char + - Assigning a string literal to any object with type + "pointer to const-qualified void" is allowed + * - `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 @@ -275,6 +282,11 @@ maintainers if you want to suggest a change. braces - + * - `Rule 9.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_04.c>`_ + - Required + - An element of an object shall not be initialized more than once + - + * - `Rule 12.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_12_05.c>`_ - Mandatory - The sizeof operator shall not have an operand which is a function -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |