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

Re: [PATCH] docs/misra: add Rule 9.3


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 12 Jul 2023 08:21:01 +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=1BQLtuBQVS06nZf24d35MEfKsKWAB7NLQOm90mslWl4=; b=CvqyB6qd0IV0y857b/6TzVRNnp9gCabQKlNrk1nV+U0aBYH3OCpCa26Hbh1AhQY8vulz9rFbMU50JKshK3HFjROmmENIGcLpfpt0PmoUo5CHRdC7Q1ob0W7MRrLV1U2y8qNzbG/dxNcTZAjTisI8y5rq3f8ydN3GPpT++wFexy+IItbvzhRcRNLQg90+FA7GDyWG15ghpPLoQfacYIPDXrpHW1JXz4A+xYxqM4ATFqgESRRp7aZ3eyj0blReeMhoRhJkMzZuBBNWrMU1hr7MUPo4YTSTOH6FkFWsIyYGMJTvHZXDdZAvmTsWW9wkA+6Fe3lvJi4H0SlW6jz/OmF56A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hixYCzYVsmQUeTB9NXDAstK+CMCA8L+O+FyxQXkOZtZ2CRJrbJ8VvGIOzjxvKOXdiz7XSqeTSbM11qipJ5N0ZBDiSsEFUPk2PzPWuPME8M7UQ5YREDyM1HSI/Eda0VMrIG/vCC/F4dJZvwIG7sFGkxLCkLgVPMz6uxkvBGk+xVGkHRMCV/GUYsikTkcEYKuOaHd4H+6Qr7NmFUWNZBKoEtVbq7k1V07Ne/ydmrM+UI8zToGzXLJmmR5qvjRIBVD6v6eGcBNgRfet1cFSUyXPXwAzwLEjni+YAWB7dj2kho0/9dP2BjbTQhPuHmMPT75CZeGwjuVG+7yuDb9/DIzFPw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Wed, 12 Jul 2023 08:22:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZtDVnm2uoBPIrqkmByEz++gKzmq+1yx6A
  • Thread-topic: [PATCH] docs/misra: add Rule 9.3


> On 11 Jul 2023, at 21:21, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
> 
> Specify that {} is allowed for zero-initialization.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>


> ---
> docs/misra/rules.rst | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
> index 72aa986bce..29a777938a 100644
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -284,6 +284,11 @@ maintainers if you want to suggest a change.
>        braces
>      -
> 
> +   * - `Rule 9.3 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_03.c>`_
> +     - Required
> +     - Arrays shall not be partially initialized
> +     - {} is also allowed to specify explicit zero-initialization

Not related to this patch, but how is the coding style for this? Is it {} 
without spaces or { } with one space?
It’s not specified in the coding style


> +
>    * - `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
> -- 
> 2.25.1
> 
> 


 


Rackspace

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