[PATCH] mtd: mtd_oobtest: Remove redundant assignment to err
Miquel Raynal
miquel.raynal at bootlin.com
Mon May 10 03:43:50 PDT 2021
On Sun, 2021-04-25 at 10:28:18 UTC, Jiapeng Chong wrote:
> Variable err is set to zero but this value is never read as it is
> overwritten with a new value later on, hence it is a redundant
> assignment and can be removed.
>
> Cleans up the following clang-analyzer warning:
>
> drivers/mtd/tests/oobtest.c:626:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:603:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:579:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:556:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:532:3: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:509:3: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci at linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong at linux.alibaba.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
More information about the linux-mtd
mailing list