|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 3/3] xen p2m: annotate variable which appears unu
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@xxxxxxxxxx>
> ---
> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|