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

Re: [Xen-devel] [[PATCH]] libxl/arm: Fix ARM build.



On Tue, May 16, 2017 at 01:59:40PM +0300, Andrii Anisov wrote:
> CC Ian Jakson and Wei Liu as maintainers.
> 
> Sincerely,
> Andrii Anisov.
> 
> 2017-05-16 13:23 GMT+03:00 Andrii Anisov <andrii.anisov@xxxxxxxxx>:
> 
> > From: Andrii Anisov <andrii_anisov@xxxxxxxx>
> >
> > Some compilers do not (validly?) detect that size will always be
> > initialized when (rc > 0), so implicitly initialize it.
> >

I'm confused by the commit message.

When rc > 0 (the default branch), size is not initialised. I guess
that's what gcc complains about?

If I'm right, would it be better to set *size to 0 in the default
branch?

> > Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
> > ---
> >  tools/libxl/libxl_arm_acpi.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c
> > index db113db..f61aec6 100644
> > --- a/tools/libxl/libxl_arm_acpi.c
> > +++ b/tools/libxl/libxl_arm_acpi.c
> > @@ -73,6 +73,8 @@ static int libxl__estimate_madt_size(libxl__gc *gc,
> >  {
> >      int rc = 0;
> >
> > +    *size = 0;
> > +
> >      switch (info->arch_arm.gic_version) {
> >      case LIBXL_GIC_VERSION_V2:
> >          *size = sizeof(struct acpi_table_madt) +
> > --
> > 2.7.4
> >
> >

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