Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaJSo-0004C1-3e for qemu-devel@nongnu.org; Mon, 01 Sep 2008 20:09:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaJSn-0004B9-I8 for qemu-devel@nongnu.org; Mon, 01 Sep 2008 20:09:41 -0400 Received: from [199.232.76.173] (port=42178 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaJSn-0004Ao-Bj for qemu-devel@nongnu.org; Mon, 01 Sep 2008 20:09:41 -0400 Received: from hall.aurel32.net ([91.121.138.14]:49890) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KaJSm-000319-Sq for qemu-devel@nongnu.org; Mon, 01 Sep 2008 20:09:41 -0400 Received: from aurel32 by hall.aurel32.net with local (Exim 4.63) (envelope-from ) id 1KaJSl-0002m5-68 for qemu-devel@nongnu.org; Tue, 02 Sep 2008 02:09:39 +0200 Date: Tue, 2 Sep 2008 02:09:39 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] suppress a couple of spurious warnings in scsi-generic.c Message-ID: <20080902000939.GB683@hall.aurel32.net> References: <18614.54492.867990.826649@mariner.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <18614.54492.867990.826649@mariner.uk.xensource.com> Sender: Aurelien Jarno Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Aug 28, 2008 at 05:39:56PM +0100, Ian Jackson wrote: > This patch fixes two spurious `may be used uninitialised' warnings > when compiling with some compilers. > > Signed-off-by: Andre Przywara > Signed-off-by: Ian Jackson > > (Manually cherry-picked from qemu-xen master > c9dba66abe8f4c4df28f3b32befe49da1b749a48) Applied, thanks. > diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c > index 60084cf..3973c25 100644 > --- a/hw/scsi-generic.c > +++ b/hw/scsi-generic.c > @@ -478,8 +478,8 @@ static int32_t scsi_send_command(SCSIDevice *d, uint32_t tag, > uint8_t *cmd, int lun) > { > SCSIDeviceState *s = d->state; > - uint32_t len; > - int cmdlen; > + uint32_t len=0; > + int cmdlen=0; > SCSIRequest *r; > int ret; > > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net