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

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


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 12 Jul 2023 11:22:50 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=4ZBV+H90nEt74P0BvK/S1m0ZVPmeIRK7ayHgTTu/NrU=; b=S12AKVMB3EETSlu8Dx+bGk/qpfMVysRrCVA7Hn3otBLSAhmNkci1C158equye8ZGg8GtVpI9wwCaGQmZBLNWUMRkjh2uy6PKdglYKTwo9kKL0/N+pFWyUAVQ6kTwqUiNSjUFAQ0fRX+iyixMF4xKqkWcgL7ewoV1Z5jai2cMjyIC0LlAlfb40NfQ3WXdDy8T5FEgBaggZYL63w3/4hKW48xzQw8VT6v5oEr7LC0zqmhiThCmhg9W7TP57TAzMjAQX/e9FLJ9vXTb5xxv9V5+c+t9sMpR8Rhtq6D7j5n6TctzpulqKMfKw/+06LGigL0sIEdevAZtq9wphJ/vaxg9+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YwpH33Yj6xIZRmMPtkSbBwVriIndUHwslfvkyTgfiDo9H12id1fQsPGOHrGb5k9e9vFyRaUBhmsmcUxYiSWvTUyosTEHIZFe70rRjIryZ5jX2GSrP7PIn7+9cOWXUU3J4qzAc4iKTDte/CBuifmCz5w4/X3NKyTMeCBBkBARviH+3OehxBCx94MTk/8HwVjjnEXr+h1iHtKh17N2sN/d8+IIX3MI8RWtG3EeY9r6o9EaJ5rQg2quzNdLcvN8CB7d2r6lMtqjnAKsvaw0uk6yWzi1GPENM0I7970qSl59EmyzsjrVhxKAKu0KbH4jChIxKzBrkSORPuUU7zFUbcjspw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "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 09:23:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.07.2023 10:21, Luca Fancellu wrote:
>> 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>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

>> --- 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

In the absence of anything written down, I'm inclined to infer both
forms are acceptable.

Jan



 


Rackspace

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