[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] docs/misra: add R16.2 and R16.3
For Rule 16.2 deviate xen/arch/x86/x86_emulate. For Rule 16.2 allow control flow statements and terminals. For the rest, request the "fallthrough" psedo-keyword to be used. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx> --- docs/misra/rules.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 375a886607..926ecc9d82 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -462,6 +462,20 @@ maintainers if you want to suggest a change. while(0) and while(1) and alike are allowed. + * - `Rule 16.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_02.c>`_ + - Required + - A switch label shall only be used when the most closely-enclosing + compound statement is the body of a switch statement + - xen/arch/x86/x86_emulate/ doesn't follow this guideline + + * - `Rule 16.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_03.c>`_ + - Required + - An unconditional break statement shall terminate every + switch-clause + - Control flow statements (goto, return, continue) and terminals + (BUG()) are permitted. Other cases shall have the pseudo-keyword + "fallthrough". + * - `Rule 16.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_07.c>`_ - Required - A switch-expression shall not have essentially Boolean type -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |