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

Re: [XEN PATCH 2/2] xen/cpu: address MISRA C Rule 17.7



On Wed, 28 Feb 2024, Julien Grall wrote:
> Hi Nicola,
> 
> On 28/02/2024 11:09, Nicola Vetrini wrote:
> > > I asked Roberto if void casts are an option for compliance.
> > > 
> > 
> > void casts are an option for sure. The rationale for the rule explicitly
> > lists them as a compliance mechanism. An interesting aspect is what would be
> > the consensus around void casts on functions whose return value is always
> > ignored vs. functions whose return value is sometimes ignored.
> 
> If a return is always ignored, then the function should return void. For the
> second case, I think it will be on the case by case basis.

+1

 
> > > In any case, I don't think we should use void casts in the specific
> > > cases this patch is dealing with. Void casts (if anything) should be a
> > > last resort while this patch fixes the issue in a better way.
> 
> +1.




 


Rackspace

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