From: Stefano Stabellini Date: Fri, 27 Jan 2023 18:35:41 +0000 (-0800) Subject: Add more rules to docs/misra/rules.rst X-Git-Tag: 4.18.0-rc1~1151 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4a1bceded2a986f91c76a9bd57ecd912cb61735d;p=xen.git Add more rules to docs/misra/rules.rst 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 Acked-by: Jan Beulich --- 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 `_ + - Required + - Octal constants shall not be used + - + + * - `Rule 7.3 `_ + - Required + - The lowercase character l shall not be used in a literal suffix + - + * - `Rule 8.1 `_ - 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 `_ + - Required + - Initializer lists shall not contain persistent side effects + - + * - `Rule 14.1 `_ - 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 `_ + - 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 `_ - Mandatory - An object shall not be assigned or copied to an overlapping