[Stgt-devel] [PATCH] silence gcc
Pete Wyckoff
pw
Mon Jul 30 19:30:44 CEST 2007
Avoid bogus unused variable warning from gcc.
Signed-off-by: Pete Wyckoff <pw at osc.edu>
---
usr/iscsi/iscsid.c | 2 +-
usr/spc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 19251e6..8fd9099 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -1190,7 +1190,7 @@ static int iscsi_tm_execute(struct iscsi_task *task)
{
struct iscsi_connection *conn = task->conn;
struct iscsi_tm *req = (struct iscsi_tm *) &task->req;
- int fn, err = 0;
+ int fn = 0, err = 0;
switch (req->flags & ISCSI_FLAG_TM_FUNC_MASK) {
case ISCSI_TM_FUNC_ABORT_TASK:
diff --git a/usr/spc.c b/usr/spc.c
index 899508c..b56c0b3 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -40,7 +40,7 @@
int spc_inquiry(int host_no, struct scsi_cmd *cmd)
{
- int len, ret = SAM_STAT_CHECK_CONDITION;
+ int len = 0, ret = SAM_STAT_CHECK_CONDITION;
uint8_t *data;
uint8_t *scb = cmd->scb;
unsigned char key = ILLEGAL_REQUEST;
--
1.5.2.4
More information about the stgt
mailing list