From 44d8f75edb75064d19bef33ea03fda6cbc19d0d1 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 6 Jun 2014 03:20:26 +0000 Subject: [PATCH] scst_lib: Fix a compiler warning triggered by the WRITE SAME implementation Avoid for release builds that the compiler reports that the variable 'ws_sg_cnt' is not used. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5570 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 0ef31e3fa..1f6e0da7b 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5020,7 +5020,6 @@ static int scst_ws_push_single_write(struct scst_write_same_priv *wsp, { struct scst_cmd *ws_cmd = wsp->ws_orig_cmd; struct scatterlist *ws_sg = wsp->ws_sg; - int ws_sg_cnt = wsp->ws_sg_cnt; int res; uint8_t write16_cdb[16]; int len = blocks << ws_cmd->dev->block_shift; @@ -5028,7 +5027,7 @@ static int scst_ws_push_single_write(struct scst_write_same_priv *wsp, TRACE_ENTRY(); - EXTRACHECKS_BUG_ON(blocks > ws_sg_cnt); + EXTRACHECKS_BUG_ON(blocks > wsp->ws_sg_cnt); if (unlikely(test_bit(SCST_CMD_ABORTED, &ws_cmd->cmd_flags)) || unlikely(ws_cmd->completed)) {