From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xensource.com,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 3/3] xen p2m: annotate variable which appears unused
Date: Fri, 11 Feb 2011 10:37:23 -0500 [thread overview]
Message-ID: <20110211153723.GA5500@dumpdata.com> (raw)
In-Reply-To: <1297437838-14797-3-git-send-email-ian.campbell@citrix.com>
On Fri, Feb 11, 2011 at 03:23:58PM +0000, Ian Campbell wrote:
> CC arch/x86/xen/p2m.o
> arch/x86/xen/p2m.c: In function 'm2p_remove_override':
> arch/x86/xen/p2m.c:460: warning: 'address' may be used uninitialized in this function
> arch/x86/xen/p2m.c: In function 'm2p_add_override':
> arch/x86/xen/p2m.c:426: warning: 'address' may be used uninitialized in this function
Thanks for doing those. I've been seeing them for weeks now and just never
got off to fixing them.
>
> In actual fact address is inialised in one "if (!PageHighMem(page))"
> statement and used in a second and so is always initialised before
> use.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> arch/x86/xen/p2m.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
> index 53fe9fc..3720efa 100644
> --- a/arch/x86/xen/p2m.c
> +++ b/arch/x86/xen/p2m.c
> @@ -421,7 +421,7 @@ int m2p_add_override(unsigned long mfn, struct page *page)
> {
> unsigned long flags;
> unsigned long pfn;
> - unsigned long address;
> + unsigned long uninitialized_var(address);
> unsigned level;
> pte_t *ptep = NULL;
>
> @@ -455,7 +455,7 @@ int m2p_remove_override(struct page *page)
> unsigned long flags;
> unsigned long mfn;
> unsigned long pfn;
> - unsigned long address;
> + unsigned long uninitialized_var(address);
> unsigned level;
> pte_t *ptep = NULL;
>
> --
> 1.5.6.5
next prev parent reply other threads:[~2011-02-11 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 15:23 [PATCH 1/3] xen: events: mark cpu_evtchn_mask_p as __refdata Ian Campbell
2011-02-11 15:23 ` [PATCH 2/3] xen: annotate functions which only call into __init at start of day Ian Campbell
2011-02-11 15:23 ` [PATCH 3/3] xen p2m: annotate variable which appears unused Ian Campbell
2011-02-11 15:37 ` Konrad Rzeszutek Wilk [this message]
2011-02-11 16:31 ` [PATCH 2/3] xen: annotate functions which only call into __init at start of day Jan Beulich
2011-02-11 16:37 ` 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=20110211153723.GA5500@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.