From: Colin Ian King Date: Mon, 4 Jul 2022 21:53:25 +0000 (+0100) Subject: lib/ts_bm.c: remove redundant store to variable consumed after addition X-Git-Tag: v6.1-rc5~666^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a70ce5f93aaeb0aa81f29c4a3c70f39d8f21087;p=platform%2Fkernel%2Flinux-starfive.git lib/ts_bm.c: remove redundant store to variable consumed after addition There is no need to store the result of the addition back to variable consumed after the addition. The store is redundant, replace += with just + Cleans up clang scan build warning: lib/ts_bm.c:83:11: warning: Although the value stored to 'consumed' is used in the enclosing expression, the value is never actually read from 'consumed' [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20220704215325.600993-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton --- diff --git a/lib/ts_bm.c b/lib/ts_bm.c index 4cf2500..1f22342 100644 --- a/lib/ts_bm.c +++ b/lib/ts_bm.c @@ -80,7 +80,7 @@ static unsigned int bm_find(struct ts_config *conf, struct ts_state *state) /* London calling... */ DEBUGP("found!\n"); - return consumed += (shift-(bm->patlen-1)); + return consumed + (shift-(bm->patlen-1)); next: bs = bm->bad_shift[text[shift-i]];