aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-08-13 13:05:44 +0200
committerBlue Swirl <blauwirbel@gmail.com>2012-08-18 08:50:09 +0000
commitd83c951cce14dd3c7600c386d3791c4993744622 (patch)
treee5fcd49814fe91f4056e21bd4b67e64668455e65 /hw
parent5f893b4e9c207c5a38cf7b141d2c54fa30046afd (diff)
downloadqemu-d83c951cce14dd3c7600c386d3791c4993744622.zip
qemu-d83c951cce14dd3c7600c386d3791c4993744622.tar.gz
qemu-d83c951cce14dd3c7600c386d3791c4993744622.tar.bz2
scsi: fix warning
hw/scsi-bus.c:758: warning: ‘xfer’ may be used uninitialized 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 <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi-bus.c2
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 *dev, uint8_t *buf)
switch (length) {
case 0:
case 3: /* USB-specific. */
+ default:
xfer = 0;
break;
case 1:
@@ -784,6 +785,7 @@ static int ata_passthrough_16_xfer_size(SCSIDevice *dev, uint8_t *buf)
switch (length) {
case 0:
case 3: /* USB-specific. */
+ default:
xfer = 0;
break;
case 1: