Skip to content

Commit

Permalink
xen p2m: annotate variable which appears unused
Browse files Browse the repository at this point in the history
 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

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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Ian Campbell authored and Konrad Rzeszutek Wilk committed Feb 11, 2011
1 parent b052181 commit 6b08cfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 6b08cfe

Please sign in to comment.