From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVWd9-0004pm-Iq for qemu-devel@nongnu.org; Thu, 14 Jan 2010 15:49:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVWd6-0004jL-1J for qemu-devel@nongnu.org; Thu, 14 Jan 2010 15:49:23 -0500 Received: from [199.232.76.173] (port=54287 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVWd5-0004j1-N8 for qemu-devel@nongnu.org; Thu, 14 Jan 2010 15:49:19 -0500 Received: from mail-pz0-f190.google.com ([209.85.222.190]:46777) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVWd5-0004TS-8J for qemu-devel@nongnu.org; Thu, 14 Jan 2010 15:49:19 -0500 Received: by pzk28 with SMTP id 28so55024pzk.4 for ; Thu, 14 Jan 2010 12:49:12 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20100114030924.GF24002@amit-x200.redhat.com> References: <20100112181307.GD19438@amit-x200.redhat.com> <20100113070254.GD31063@amit-x200.redhat.com> <20100114030924.GF24002@amit-x200.redhat.com> From: Blue Swirl Date: Thu, 14 Jan 2010 20:48:52 +0000 Message-ID: Subject: Re: [Qemu-devel] Static analysis using clang on the x86_64 target Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org On Thu, Jan 14, 2010 at 3:09 AM, Amit Shah wrote: > On (Wed) Jan 13 2010 [19:08:11], Blue Swirl wrote: >> >> Thanks. I fixed the warnings related to Sparc32. Were there really no >> new warnings for Sparc64? > > Looks like it; vl.c gets reported three times at the same locations so 3 > arches have been compiled. > > My test machine is down ATM, I can confirm later when it's up. > > BTW for the patch > > commit 884a0c7677cf8431d2a632673914994c2e01673d > > =C2=A0 =C2=A0pcnet: remove dead nested assignment, spotted by clang > > diff --git a/hw/pcnet.c b/hw/pcnet.c > index 91d106d..44b5b31 100644 > --- a/hw/pcnet.c > +++ b/hw/pcnet.c > @@ -1608,7 +1608,7 @@ static void pcnet_aprom_writeb(void *opaque, > uint32_t addr, uint32_t val) > =C2=A0static uint32_t pcnet_aprom_readb(void *opaque, uint32_t addr) > =C2=A0{ > =C2=A0 =C2=A0 PCNetState *s =3D opaque; > - =C2=A0 =C2=A0uint32_t val =3D s->prom[addr &=3D 15]; > + =C2=A0 =C2=A0uint32_t val =3D s->prom[addr & 15]; > =C2=A0#ifdef PCNET_DEBUG > =C2=A0 =C2=A0 printf("pcnet_aprom_readb addr=3D0x%08x val=3D0x%02x\n", ad= dr, val); > =C2=A0#endif > > > if debugging is enabled, addr will now print a different value than > earlier. It should be harmless, pcnet_aprom_readb doesn't do addr & 15 either. It's probably a relic from the time when the devices were passed the MMIO address instead of offset.