[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1377132262-15744-1-git-send-email-zwu.kernel@gmail.com>
Date: Thu, 22 Aug 2013 08:44:22 +0800
From: zwu.kernel@...il.com
To: linux-scsi@...r.kernel.org
Cc: jbottomley@...allels.com, linux-kernel@...r.kernel.org,
Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Subject: [PATCH] scsi: fix the build warning
From: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Initialize csum variable to fix the build warning.
drivers/scsi/scsi_debug.c: In function ‘dif_verify’:
drivers/scsi/scsi_debug.c:1755:3: warning: ‘csum’ may be used uninitialized in this function [-Wmaybe-uninitialized]
LD drivers/built-in.o
CHK include/generated/uapi/linux/version.h
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `relocs'.
Signed-off-by: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
---
drivers/scsi/scsi_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index cb4fefa..50d70c3 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1733,7 +1733,7 @@ static int do_device_access(struct scsi_cmnd *scmd,
static u16 dif_compute_csum(const void *buf, int len)
{
- u16 csum;
+ u16 csum = -1;
switch (scsi_debug_guard) {
case 1:
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists