From 5358fb06f823181930f15587ba124b6cca0436d8 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 1 Jun 2017 04:04:45 +0000 Subject: [PATCH] scst: remove a few unnecessary shadow declarations Remove a few "shadow" declarations that appear unnecessary and probably unintended. (These are cases where a declaration in an inner scope hides another declaration of the same name in an outer scope.) Not all shadow declarations are superfluous -- so this particular compiler warning is one that cannot be simply heeded while half asleep. But these particular ones I removed appear to be superfluous. Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7201 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 4 ---- scst/src/scst_targ.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 9393364b9..08c09684d 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -6129,8 +6129,6 @@ static void scst_ws_write_cmd_finished(struct scst_cmd *cmd) wsp->ws_cur_in_flight--; if (cmd->status != 0) { - int rc; - TRACE_DBG("Write cmd %p (ws cmd %p) finished not successfully", cmd, ws_cmd); sBUG_ON(cmd->resp_data_len != 0); @@ -6560,8 +6558,6 @@ static void scst_cwr_read_cmd_finished(struct scst_cmd *cmd) TRACE_DBG("READ cmd %p finished (cwr cmd %p)", cmd, cwr_cmd); if (cmd->status != 0) { - int rc; - TRACE_DBG("Read cmd %p (cwr cmd %p) finished not successfully", cmd, cwr_cmd); sBUG_ON(cmd->resp_data_len != 0); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index b6d53b6cd..344a71bc0 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -4141,7 +4141,7 @@ next: if (likely(scst_cmd_completed_good(cmd))) { if (cmd->deferred_dif_read_check) { - int rc = scst_dif_process_read(cmd); + rc = scst_dif_process_read(cmd); if (unlikely(rc != 0)) { cmd->deferred_dif_read_check = 0; @@ -7441,7 +7441,6 @@ static int scst_mgmt_affected_cmds_done(struct scst_mgmt_cmd *mcmd) list_for_each_entry(s, &tgt->sess_list, sess_list_entry) { for (i = 0; i < SESS_TGT_DEV_LIST_HASH_SIZE; i++) { struct list_head *head = &s->sess_tgt_dev_list[i]; - struct scst_tgt_dev *tgt_dev; list_for_each_entry(tgt_dev, head, sess_tgt_dev_list_entry) {