Skip to contentSkip to conversation

[5127] suppress a couple of spurious warnings in scsi-generic.c

Qemu-devel Aurelien Jarno 1 participant 1 message Sep 2, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5127

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5127
Author:   aurel32
Date:     2008-09-02 00:08:58 +0000 (Tue, 02 Sep 2008)

Log Message:
-----------
suppress a couple of spurious warnings in scsi-generic.c

This patch fixes two spurious `may be used uninitialised' warnings when compiling with some compilers.

Modified Paths:
--------------
trunk/hw/scsi-generic.c

Modified: trunk/hw/scsi-generic.c
===================================================================

hw/scsi-generic.c +2 -2
@@ -478,8 +478,8 @@
                                  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;