From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzpEs-0000aP-2q for qemu-devel@nongnu.org; Fri, 10 Aug 2012 09:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzpEn-0006pm-PC for qemu-devel@nongnu.org; Fri, 10 Aug 2012 09:26:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzpEn-0006oX-Hn for qemu-devel@nongnu.org; Fri, 10 Aug 2012 09:26:49 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7ADQlTf012950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 10 Aug 2012 09:26:47 -0400 From: Gerd Hoffmann Date: Fri, 10 Aug 2012 15:26:45 +0200 Message-Id: <1344605205-28583-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1344605205-28583-1-git-send-email-kraxel@redhat.com> References: <1344605205-28583-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 2/2] scsi: fix warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann hw/scsi-bus.c:758: warning: =E2=80=98xfer=E2=80=99 may be used uninitiali= zed in this function Isn't true, but older gcc versions (for example 4.1 as shipped in rhel5) are not clever enougth to figure, so sprinkle in a default: line to make them happy. Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index b8a857d..4981a02 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -761,6 +761,7 @@ static int ata_passthrough_12_xfer_size(SCSIDevice *d= ev, uint8_t *buf) switch (length) { case 0: case 3: /* USB-specific. */ + default: xfer =3D 0; break; case 1: @@ -784,6 +785,7 @@ static int ata_passthrough_16_xfer_size(SCSIDevice *d= ev, uint8_t *buf) switch (length) { case 0: case 3: /* USB-specific. */ + default: xfer =3D 0; break; case 1: --=20 1.7.1