[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Introduce more MISRA C rules to docs/misra/rules.rst


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 29 Nov 2022 09:50:38 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t5nIHmzlzR1OL4IKOJt+GMbsscZUl4pg5fcENDAO+QM=; b=F1K6dlK3O77LuSqIgQQ3q9uFqu5ofphSWNrdhQ/OUPBL/DoDT/4UTg//xte/vSC1xd4AV6CZWLRcrNGae+n9S3aEwfKpUOP9qVe7qzLAwq9Cu1A5zRL+ru6S0Xc9nd9DCAw38BkLgu8/isYQsCoDX18plfZTc4BeOlDLQIoIa7vKXJuFTG77GJtqbGks2U5ompL6HT1sDN+n49jja3L8Y6ji+PPyqI5e+pyJ7cnI9fhDnitJSep10NTcNq3lXO7ZvshegyLTLUvfDqWcQT58LOiI4jg5atEpUI0Fx6taCkunsThUsWEdCoknxdRiwT3eWLdK30rmeWWIBZ9+VYQfCg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jm4aGdhhw52Jq2i4BHYUVbVkAALmGcZ+oDcxBjUYK5zIOdzF91YYNi0WCsi57kvZElkIXe8iTQrms3JfF7x2RRGXkVFWP6GGVA8zvHHngvtyk9ga1DX2Fz4ANrzHHt/0lM5hzqSj7K9oWsYU7tCxXO0cNnx7ILe43WTpTZFk+tyO+XvlktYTkpI4/hPk5wsILHHW0dj71PRISjbKyKKm6LB2llIo653NvLrfngfFVKqldPAX+AOpWvYUNEasFxVAh1wo2M1VqbWMwqXnbBsdpKOjhLX9iLRNsGdG45olgRYPbpEFRhwl4I99CtcmjcVKDaRNbe3mG3+boxFV+ZAVkA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Tue, 29 Nov 2022 09:51:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHZA4gfi8O26GJwAkiNeMgx9oJ4ZK5VqQCA
  • Thread-topic: [PATCH] Introduce more MISRA C rules to docs/misra/rules.rst

Hi,

> On 29 Nov 2022, at 00:18, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
> 
> Add the new MISRA C rules agreed by the MISRA C working group to
> docs/misra/rules.rst.
> 
> Add a comment for Rule 19.1 to explain that Eclair's findings are
> "caution" reports, not violations.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> docs/misra/rules.rst | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> 
> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
> index 8a659d8d47..dcceab9388 100644
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -77,11 +77,32 @@ existing codebase are work-in-progress.
>        behaviour
>      -
> 
> +   * - `Rule 2.6 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>`_
> +     - Advisory
> +     - A function should not contain unused label declarations
> +     -
> +
> +   * - `Rule 3.1 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_01.c>`_
> +     - Required
> +     - The character sequences /* and // shall not be used within a
> +       comment
> +     -
> +
>    * - `Rule 3.2 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_02.c>`_
>      - Required
>      - Line-splicing shall not be used in // comments
>      -
> 
> +   * - `Rule 4.1 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_04_01.c>`_
> +     - Required
> +     - Octal and hexadecimal escape sequences shall be terminated
> +     -
> +
> +   * - `Rule 4.2 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_04_02.c>`_
> +     - Advisory
> +     - Trigraphs should not be used
> +     -
> +
>    * - `Rule 5.1 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_01_2.c>`_
>      - Required
>      - External identifiers shall be distinct
> @@ -200,6 +221,21 @@ existing codebase are work-in-progress.
>        have an explicit return statement with an expression
>      -
> 
> +   * - `Rule 17.6 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_06.c>`_
> +     - Mandatory
> +     - The declaration of an array parameter shall not contain the
> +       static keyword between the [ ]
> +     -
> +
> +   * - `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
> +       object
> +     - Be aware that the static analysis tool Eclair might report
> +       several findings for Rule 19.1 of type "caution". These are
> +       instances where Eclair is unable to verify that the code is valid
> +       in regard to Rule 19.1. Caution reports are not violations.
> +
>    * - `Rule 20.7 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_07.c>`_
>      - Required
>      - Expressions resulting from the expansion of macro parameters
> -- 
> 2.25.1
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.