From: Dario Faggioli <dario.faggioli@citrix.com>
To: Charles Arnold <carnold@suse.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxl: 'valid_devs' may be used uninitialized
Date: Fri, 15 May 2015 19:39:21 +0200 [thread overview]
Message-ID: <1431711561.2978.182.camel@citrix.com> (raw)
In-Reply-To: <5555D31C02000091000F7CC4@prv-mh.provo.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1018 bytes --]
On Fri, 2015-05-15 at 11:06 -0600, Charles Arnold wrote:
> Using gcc 4.8 to compile with -Werror.
>
> xl_cmdimpl.c:5493:8: error: 'valid_devs' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> if (valid_devs == 0)
> ^
> xl_cmdimpl.c:5455:9: note: 'valid_devs' was declared here
> int valid_devs;
>
> Signed-off-by: Charles Arnold <carnold@suse.com>
>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
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 = 0;
>
>
> cpuinfo = libxl_get_cpu_topology(ctx, &nr);
>
...You could kill one of the two blank line (one is enough).
Regards,
Dario
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-05-15 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 17:06 [PATCH] libxl: 'valid_devs' may be used uninitialized Charles Arnold
2015-05-15 17:39 ` Dario Faggioli [this message]
2015-05-21 14:52 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431711561.2978.182.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=carnold@suse.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.