Patch 8.2.4110

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 16, 2022, 9:52:06 AM1/16/22
to vim...@googlegroups.com

Patch 8.2.4110
Problem: Coverity warns for using NULL pointer.
Solution: Check "evalarg" is not NULL. Skip errors when "verbose" is false.
Files: src/eval.c


*** ../vim-8.2.4109/src/eval.c 2022-01-15 21:08:11.899395839 +0000
--- src/eval.c 2022-01-16 14:49:37.642531591 +0000
***************
*** 3973,3980 ****
int len2;
char_u *fname;
int idx;
! imported_T *import = find_imported(name, len,
! TRUE, evalarg->eval_cctx);
type_T *type;

// value->import.func()
--- 3973,3980 ----
int len2;
char_u *fname;
int idx;
! imported_T *import = find_imported(name, len, TRUE,
! evalarg == NULL ? NULL : evalarg->eval_cctx);
type_T *type;

// value->import.func()
***************
*** 3986,3995 ****
len2 = get_name_len(arg, &alias, evaluate, TRUE);
if (len2 <= 0)
{
! emsg(_(e_missing_name_after_dot));
ret = FAIL;
}
! else
{
int cc = fname[len2];
ufunc_T *ufunc;
--- 3986,3996 ----
len2 = get_name_len(arg, &alias, evaluate, TRUE);
if (len2 <= 0)
{
! if (verbose)
! emsg(_(e_missing_name_after_dot));
ret = FAIL;
}
! else if (evaluate)
{
int cc = fname[len2];
ufunc_T *ufunc;
***************
*** 4014,4020 ****
else
{
// TODO: how about a partial?
! semsg(_(e_not_callable_type_str), fname);
ret = FAIL;
}
}
--- 4015,4022 ----
else
{
// TODO: how about a partial?
! if (verbose)
! semsg(_(e_not_callable_type_str), fname);
ret = FAIL;
}
}
*** ../vim-8.2.4109/src/version.c 2022-01-16 14:15:45.517045001 +0000
--- src/version.c 2022-01-16 14:50:30.186291501 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4110,
/**/

--
Shit makes the flowers grow and that's beautiful

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages