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

Re: [Xen-devel] [PATCH] x86/vmx: fix compilation after 997382



On Tue, Feb 14, 2017 at 03:46:37AM -0700, Jan Beulich wrote:
> >>> On 14.02.17 at 11:37, <roger.pau@xxxxxxxxxx> wrote:
> > 997382 introduced the following errors:
> > 
> > intr.c:342:46: error: address of array 'vlapic->regs->data' will always 
> > evaluate to 'true'
> >       [-Werror,-Wpointer-bool-conversion]
> >                 if ( vlapic && vlapic->regs->data )
> >                             ~~ ~~~~~~~~~~~~~~^~~~
> > intr.c:352:42: error: address of array 'pi_desc->pir' will always evaluate 
> > to 
> > 'true'
> >       [-Werror,-Wpointer-bool-conversion]
> >                 if ( pi_desc && pi_desc->pir )
> >                              ~~ ~~~~~~~~~^~~
> > Both of those checks are done against static arrays, which doesn't seem to 
> > make
> > much sense, so just remove them.
> 
> Darn, I had meant to check while massaging the patch, but then
> forgot.
> 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> > NB: maybe the first check should be against vlapic->regs?
> 
> Yes, please. Or I can do this while committing. The subject, btw,
> should probably include "clang", as neither I nor osstest have an
> issue with gcc?

If you don't mind please change the check while committing, so that it's
against vlapic->regs. Regarding the subject, what about:

x86/vmx: fix compilation with clang after 997382

FWIW, neither the versions of clang in travis seem to pick this up:

https://travis-ci.org/xen-project/xen/builds/201180775

Thanks, Roger.

_______________________________________________
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®.