From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] libxl: Initialize valid_devs in output_topologyinfo() Date: Thu, 21 May 2015 15:52:16 +0100 Message-ID: <1432219936.10746.58.camel@citrix.com> References: <1431702417-9006-1-git-send-email-boris.ostrovsky@oracle.com> <20150518094814.GB6185@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150518094814.GB6185@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Boris Ostrovsky , xen-devel@lists.xen.org, ian.jackson@eu.citrix.com, olaf@aepfle.de, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2015-05-18 at 10:48 +0100, Wei Liu wrote: > On Fri, May 15, 2015 at 11:06:57AM -0400, Boris Ostrovsky wrote: > > Commit e78e8b9bb649 ("libxl: Add interface for querying hypervisor > > about PCI topology") neglected to initialize valid_devs. This > > may result in not printing a message to console if no IO topology > > information is available and, more importantly, may break non-debug > > builds on some versions of gcc. > > > > Signed-off-by: Boris Ostrovsky > > Reported-by: Olaf Hering > > Acked-by: Wei Liu Thanks, but I already just applied a similar looking patch from Charles Arnold. > > > --- > > tools/libxl/xl_cmdimpl.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > index 373aa37..6d60ce4 100644 > > --- a/tools/libxl/xl_cmdimpl.c > > +++ b/tools/libxl/xl_cmdimpl.c > > @@ -5423,7 +5423,7 @@ static void output_topologyinfo(void) > > libxl_cputopology *cpuinfo; > > int i, nr; > > libxl_pcitopology *pciinfo; > > - int valid_devs; > > + int valid_devs = 0; > > > > > > cpuinfo = libxl_get_cpu_topology(ctx, &nr); > > -- > > 1.7.1