From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aurelien Jarno Subject: Re: [PATCH] qemu: avoid returning uninitialized value in apic_mem_readl Date: Mon, 07 Apr 2008 11:12:26 +0200 Message-ID: <47F9E57A.9080906@aurel32.net> References: <20080406233344.GC7213@tapir> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: kvm-devel@lists.sourceforge.net To: Carlo Marcelo Arenas Belon Return-path: In-Reply-To: <20080406233344.GC7213@tapir> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Carlo Marcelo Arenas Belon a =E9crit : > complement 64173d009c1f4d163c425b14aa650df5b982428a to avoid : > = > kvm-65/qemu/hw/apic.c: In function `apic_mem_readl': > kvm-65/qemu/hw/apic.c:592: warning: 'val' might be used uninitialized i= n this function > = > Signed-off-by: Carlo Marcelo Arenas Belon > --- > qemu/hw/apic.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > = > diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c > index 4102493..b69ad75 100644 > --- a/qemu/hw/apic.c > +++ b/qemu/hw/apic.c > @@ -616,6 +616,7 @@ static uint32_t apic_mem_readl(void *opaque, target_p= hys_addr_t addr) > val =3D apic_get_ppr(s); > break; > case 0x0b: > + val =3D 0; > break; > case 0x0d: > val =3D s->log_dest << 24; The equivalent of commit 64173d009c1f4d163c425b14aa650df5b982428a in qemu has been done this way. So a merge of qemu SVN should fix this problem. -- = .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference = Register now and save $200. Hurry, offer ends at 11:59 p.m., = Monday, April 7! Use priority code J8TLD2. = http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java= one