summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-04 11:42:22 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-04 11:42:22 +0100
commita5348f241bbbb6d5db863d666fa9ca72fc95037a (patch)
tree5395b780659a206cb73f8080b2b59ee0f433a96b
parent5fbbec180b623cd6ebfc9528be6fa70b4cf664d4 (diff)
downloadvim-git-9.0.0373.tar.gz
patch 9.0.0373: Coverity warns for NULL check and unused return valuev9.0.0373
Problem: Coverity warns for NULL check and unused return value. Solution: Remove the NULL check, it was already checked earlier. Add (void) to ignore the return value.
-rw-r--r--src/ex_eval.c2
-rw-r--r--src/version.c2
-rw-r--r--src/vim9execute.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 61d288157..2f31b3e1c 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -925,7 +925,7 @@ cmd_is_name_only(char_u *arg)
}
else if (*p == '$')
++p;
- get_name_len(&p, &alias, FALSE, FALSE);
+ (void)get_name_len(&p, &alias, FALSE, FALSE);
}
name_only = ends_excmd2(arg, skipwhite(p));
vim_free(alias);
diff --git a/src/version.c b/src/version.c
index 0209280f0..c76830203 100644
--- a/src/version.c
+++ b/src/version.c
@@ -708,6 +708,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 373,
+/**/
372,
/**/
371,
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 3e0a37773..3c4f1a258 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -862,7 +862,7 @@ add_defer_func(int var_idx, int argcount, ectx_T *ectx)
if (defer_tv->v_type != VAR_LIST)
{
- // first one, allocate the list
+ // first time, allocate the list
if (rettv_list_alloc(defer_tv) == FAIL)
return FAIL;
}
@@ -874,8 +874,7 @@ add_defer_func(int var_idx, int argcount, ectx_T *ectx)
listval.v_type = VAR_LIST;
listval.vval.v_list = l;
listval.v_lock = 0;
- if (list_insert_tv(defer_l, &listval,
- defer_l == NULL ? NULL : defer_l->lv_first) == FAIL)
+ if (list_insert_tv(defer_l, &listval, defer_l->lv_first) == FAIL)
{
vim_free(l);
return FAIL;