cli: remove unused variable assigment
authorPetr Štetiar <ynezz@true.cz>
Mon, 4 Nov 2019 23:28:15 +0000 (00:28 +0100)
committerPetr Štetiar <ynezz@true.cz>
Thu, 14 Nov 2019 16:11:34 +0000 (17:11 +0100)
scan-build from clang version 9 has reported following issue:

 cli.c:574:8: warning: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret'
                if ((ret = uci_parse_argument(ctx, input, &str, &argv[i])) != UCI_OK) {
                     ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Petr Štetiar <ynezz@true.cz>
cli.c

diff --git a/cli.c b/cli.c
index 1ce4d5ed1d334b913b3ceaa2e1925e33264fe1d8..8970f4f0b8cec1f0eed0804272e22bcfeb06d667 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -571,7 +571,7 @@ static int uci_batch_cmd(void)
                        return 1;
                }
                argv[i] = NULL;
-               if ((ret = uci_parse_argument(ctx, input, &str, &argv[i])) != UCI_OK) {
+               if (uci_parse_argument(ctx, input, &str, &argv[i]) != UCI_OK) {
                        cli_perror();
                        i = 0;
                        break;