From b6440a0d3b1f31d1ef8446b343214e998c64d72e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 6 Nov 2015 17:48:37 +0000 Subject: [PATCH] scst_tg: Suppress a smatch complaint git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6598 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_tg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index 20a469939..7ecf67c3e 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -1687,7 +1687,13 @@ int scst_tg_set_group_info(struct scst_cmd *cmd) TRACE_DBG("dg %s (%p) found, dev %s", dg->name, dg, dev->virt_name); for (i = 4, j = 0; i + 4 <= len; i += 4, j++) { +#ifndef __CHECKER__ + /* + * Hide the statement below for smatch because otherwise it + * triggers a false positive. + */ WARN_ON_ONCE(j >= tpg_desc_count); +#endif osi[j].new_state = buf[i] & 0x1f; switch (osi[j].new_state) { case SCST_TG_STATE_OPTIMIZED: