|
[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
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |