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 <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5570 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2014-06-06 03:20:26 +00:00
parent 375443a442
commit 44d8f75edb

View File

@@ -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)) {