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

Re: [Xen-devel] [PATCH] xen/arm: Fix ARM build following c/s 11c397c



On 08/02/17 19:13, Julien Grall wrote:
> Hi Andrew,
>
> On 08/02/17 19:10, Andrew Cooper wrote:
>> c/s 11c397c broke the ARM build by introducing a common ACCESS_ONCE()
>> which is
>> different to the definiton in smmu.c
>>
>> The SMMU code included a scalar typecheck, which is worth keeping in the
>> common case, given ACCESS_ONCE()'s restrictions.  However, express the
>> typecheck differently so as to avoid Coverity compliants about unused
>
> s/compliants/complaint/

In this case, it is multiple individual complains about unused
individual variables, so "complaints" is scans perfectly well.

An alternative would be "to avoid Coverity complaining about..." if you
prefer?

>
>> variables.
>
> OOI, the variable is marked as "__maybe_unused", so why Coverity would
> complaint?

The entire purpose of Coverity is to second guess what the programmer
actually wrote when it looks suspicious.

As for this specific example, I believe that the annotation doesn't even
survive into the GCC Abstract Syntax Tree, which means Coverity doesn't
get to see it.  Even if it does, the complaint of "This variable is
unused - why do you need it?" is still valid.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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