Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYkXV-0002UK-7V for qemu-devel@nongnu.org; Thu, 28 Aug 2008 12:40:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYkXT-0002Tt-MW for qemu-devel@nongnu.org; Thu, 28 Aug 2008 12:40:04 -0400 Received: from [199.232.76.173] (port=55919 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYkXT-0002Tq-Jj for qemu-devel@nongnu.org; Thu, 28 Aug 2008 12:40:03 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:62704) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KYkXT-0007zy-JF for qemu-devel@nongnu.org; Thu, 28 Aug 2008 12:40:03 -0400 Received: from mariner.uk.xensource.com ([10.80.2.22]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id m7SGdvNx023764 for ; Thu, 28 Aug 2008 09:39:57 -0700 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.63) (envelope-from ) id 1KYkXM-0002tl-SG for qemu-devel@nongnu.org; Thu, 28 Aug 2008 17:39:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18614.54492.867990.826649@mariner.uk.xensource.com> Date: Thu, 28 Aug 2008 17:39:56 +0100 From: Ian Jackson Subject: [Qemu-devel] [PATCH] suppress a couple of spurious warnings in scsi-generic.c 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 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) 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;