From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 3/3] xen p2m: annotate variable which appears unused Date: Fri, 11 Feb 2011 10:37:23 -0500 Message-ID: <20110211153723.GA5500@dumpdata.com> References: <1297437838-14797-1-git-send-email-ian.campbell@citrix.com> <1297437838-14797-2-git-send-email-ian.campbell@citrix.com> <1297437838-14797-3-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1297437838-14797-3-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: xen-devel@lists.xensource.com, Jeremy Fitzhardinge , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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 > --- > 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