From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] libxl: 'valid_devs' may be used uninitialized Date: Fri, 15 May 2015 19:39:21 +0200 Message-ID: <1431711561.2978.182.camel@citrix.com> References: <5555D31C02000091000F7CC4@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1498643878073139306==" Return-path: In-Reply-To: <5555D31C02000091000F7CC4@prv-mh.provo.novell.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: Charles Arnold Cc: Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org --===============1498643878073139306== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-acf1Yqz3ZUzW0vWbreYl" --=-acf1Yqz3ZUzW0vWbreYl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-05-15 at 11:06 -0600, Charles Arnold wrote: > Using gcc 4.8 to compile with -Werror. >=20 > xl_cmdimpl.c:5493:8: error: 'valid_devs' may be used uninitialized in thi= s function [-Werror=3Dmaybe-uninitialized] > if (valid_devs =3D=3D 0) > ^ > xl_cmdimpl.c:5455:9: note: 'valid_devs' was declared here > int valid_devs; >=20 > Signed-off-by: Charles Arnold >=20 Reviewed-by: Dario Faggioli Although, while there... > 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 =3D 0; > =20 > > cpuinfo =3D libxl_get_cpu_topology(ctx, &nr); >=20 ...You could kill one of the two blank line (one is enough). Regards, Dario --=-acf1Yqz3ZUzW0vWbreYl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlVWL0kACgkQk4XaBE3IOsSyIQCglUtl2v6kPOJj+JDo4k/wEhn3 950AnRs7YO/oMdUli2DmnHY+zkG4XOqo =DFVb -----END PGP SIGNATURE----- --=-acf1Yqz3ZUzW0vWbreYl-- --===============1498643878073139306== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1498643878073139306==--