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

Re: [RFC PATCH 01/18] arm: cppcheck: misra rule 20.7 deviations for alternative.h


  • To: Julien Grall <julien@xxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 20 Dec 2022 10:31:16 +0100
  • 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=sLtPC61751IpwhUcuuXLlTDWtVrGTCjSmqCq07KWVQA=; b=FrAitCxJ4kjJt04Bgq5duOrVsLkUOxAeP3SdUTtu7Y1nhTg1XPeFurKflEJT7m4v4X0F8LLIvMQrUG6N/4ntlb82fyw7g++Zk4lQ+mfdYNAX4sibUB5pmXIcNg2fEAQCvZY+xnkfRNUaG8/0/oVRC39raDY+OrXQlrdgC8FhilgY79fBeBTfm/vDNun88rE42Gra/0vH3rNc9r8SGOh1emr9hYzP26DMYzHnO9KLwEBrt16Lv3AizTPu4JyGEd+a0F3jFqe018bsGj1DsdJGqm4iC9E8DPSg7vp69SXJ+OtBh0fCHesxerTJvEP2tp3DQ3mdmNOUsT+4T/Pc8aWQIA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XTBSSfswO8F9ApAPXqvkBa/kJoNYXQqk5lUmaTezQWfHPxbT4158pkIXnNfu9ttP+La5OQTfEl1Q3SIf4kewmWpAa/chJXwc2zf064iNnHW7IqlGiBaZ9cqKMS70VI44XyiKZEgyx3KOt4UxC2hrTA+gI6Vg50OHCI4z4yHNWmlOwz4sEMn5zbyWmfPCq5YZ13oLssxo2D7iOoBTbHg3XW2OBr/c1lllq/UkBb6GCj+oTcOwp9kTeqnGj6FNIyXHUvg1qoWuJcl1cPOK+LNPjBQlk3GNZa90hUc2427Fd910ogZmm6d1T/IaqjSogXApjjkb+fTJxCsBPZv2CGKUcg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: wei.chen@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 20 Dec 2022 09:31:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.12.2022 10:07, Julien Grall wrote:
> On 20/12/2022 08:50, Luca Fancellu wrote:
>> --- a/docs/misra/false-positive-cppcheck.json
>> +++ b/docs/misra/false-positive-cppcheck.json
>> @@ -3,6 +3,20 @@
>>       "content": [
>>           {
>>               "id": "SAF-0-false-positive-cppcheck",
>> +            "violation-id": "misra-c2012-20.7",
>> +            "tool-version": "2.7",
>> +            "name": "R20.7 second operand of member-access operator",
>> +            "text": "The second operand of a member access operator shall 
>> be a name of a member of the type pointed to, so in this particular case it 
>> is wrong to use parentheses on the macro parameter."
>> +        },
>> +        {
>> +            "id": "SAF-1-false-positive-cppcheck",
>> +            "violation-id": "misra-c2012-20.7",
>> +            "tool-version": "2.7",
>> +            "name": "R20.7 C macro parameters used only for text 
>> substitution",
>> +            "text": "The macro parameters used in this case are not part of 
>> an expression, they are used for text substitution."
>> +        },
> In both cases the constructs are commonly used in Xen to generate code. 
> So I am a bit concerned to have to add deviation everywhere cppcheck is 
> wrong.
> 
> More generally, we are still at the beginning of MISRA in Xen and I 
> don't think we should start with adding deviations from bugs in the 
> tools. Instead, we should report those bugs and hopefully by the time 
> Xen is mostly MISRA complaint the tools will not report the false positive.
> 
> If they are still then we can decide to add deviations.

+1

Jan



 


Rackspace

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