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

Re: [PATCH] docs/misra: add Rules 8.2, 8.3, 8.14


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 22 Jun 2023 09:45:21 +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=uK9yz4PV+fxnM5auYG/u4lO7vuM4ivFQCsoIjObR5T4=; b=Ki7vm1doBOaaWTRAgGzIJ8eB05oGy02GomlprxzuefCXMbI8qmX6wneYYjivx5f81+y8Erb32xtvjDtVZJ4ISjI8/iurki+PuVcJrbUcmE6Tr1uxPTO7Dcmvjp21z8v3TkWDsg/GYMQR7tB8Xmc/lTqJnUFWxt4Q7m11qKd8k3zbQsSHeGddnAyRpCsISmYTHZx+FIzvM7osJVdN9YqwGZvY7uxoespu11CGsj3JqB5yFI8cCUqp0F/LF2CQG7N0hnCF2YvmcRbg8fCwMn91FN2gI3xs59vfleQKtgfreBmxA54vGKLv2dY9yfZFjJucXoMyRTvM0JCtf3VP9TfRnQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YwyCCFqu4Jp322Ado+B+ntjxo24kSEz+3/Grc580QpzkqKr7ZNrlgId5ASF6QZ1VEFz0kk4nsB6qLh/OkXtqlGKlivRWaTo3x5Eq4M1Fz6PSh447qJ+ecU8y/D44CxU3DIDtzNJdibHkuj9Ik48+YYgUWOAvAnMKA1eqb1n3ssD0py56BaUfXWo3NugsJ8nsgc8ejFGQHuYtrkXEtn2GYhuf47z/TH9YwSxhu5Rq7pLxAOG0wqIHapLOdGTgAIfzfrXR7zkietSQHw/3ckldWuChRwNq8mTIK6Yg2nF0FJs1ezpM5ManHo5pCLa4iVZbOIimHFduErvizIyThOszuw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, roberto.bagnara@xxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 22 Jun 2023 07:45:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.06.2023 23:38, Stefano Stabellini wrote:
> On Wed, 21 Jun 2023, Jan Beulich wrote:
>> On 21.06.2023 03:26, Stefano Stabellini wrote:
>>> --- a/docs/misra/rules.rst
>>> +++ b/docs/misra/rules.rst
>>> @@ -213,6 +213,17 @@ maintainers if you want to suggest a change.
>>>       - Types shall be explicitly specified
>>>       -
>>>  
>>> +   * - `Rule 8.2 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_02.c>`_
>>> +     - Required
>>> +     - Function types shall be in prototype form with named parameters
>>> +     -
>>> +
>>> +   * - `Rule 8.3 
>>> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_03.c>`_
>>> +     - Required
>>> +     - All declarations of an object or function shall use the same
>>> +       names and type qualifiers
>>> +     -
>>
>> I think we want to deal with uses of const when not qualifying a pointed-to
>> type: One approach is to simply say we don't use const like this (and the
>> few uses there are should then go away). The other, if we deem this a
>> valuable feature, would be to make a project-wide exception for this case,
>> as having such const in declarations is meaningless and hence at the risk
>> of being confusing or hampering readability.
> 
> I think they should go away (the first option you wrote).
> 
> If you are OK with it, I could add a note here, such as:
> 
> "The rule also applies to differences in const-ness."

I don't think that's necessary. A remark would be necessary if we meant to
make a particular exception. I'm not sure whether we would record the
agreed upon course of action here (i.e. as you say, drop such const).

Jan



 


Rackspace

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