Patch 9.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.
Files:      src/vim9execute.c, src/ex_eval.c


*** ../vim-9.0.0372/src/vim9execute.c   2022-09-03 21:35:50.188158217 +0100
--- src/vim9execute.c   2022-09-04 11:36:42.079574308 +0100
***************
*** 862,868 ****
  
      if (defer_tv->v_type != VAR_LIST)
      {
!       // first one, allocate the list
        if (rettv_list_alloc(defer_tv) == FAIL)
            return FAIL;
      }
--- 862,868 ----
  
      if (defer_tv->v_type != VAR_LIST)
      {
!       // first time, allocate the list
        if (rettv_list_alloc(defer_tv) == FAIL)
            return FAIL;
      }
***************
*** 874,881 ****
      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)
      {
        vim_free(l);
        return FAIL;
--- 874,880 ----
      listval.v_type = VAR_LIST;
      listval.vval.v_list = l;
      listval.v_lock = 0;
!     if (list_insert_tv(defer_l, &listval, defer_l->lv_first) == FAIL)
      {
        vim_free(l);
        return FAIL;
*** ../vim-9.0.0372/src/ex_eval.c       2022-06-15 20:31:36.000000000 +0100
--- src/ex_eval.c       2022-09-04 11:39:27.695410191 +0100
***************
*** 925,931 ****
        }
        else if (*p == '$')
            ++p;
!       get_name_len(&p, &alias, FALSE, FALSE);
      }
      name_only = ends_excmd2(arg, skipwhite(p));
      vim_free(alias);
--- 925,931 ----
        }
        else if (*p == '$')
            ++p;
!       (void)get_name_len(&p, &alias, FALSE, FALSE);
      }
      name_only = ends_excmd2(arg, skipwhite(p));
      vim_free(alias);
*** ../vim-9.0.0372/src/version.c       2022-09-03 22:08:07.794560471 +0100
--- src/version.c       2022-09-04 11:37:33.367524705 +0100
***************
*** 709,710 ****
--- 709,712 ----
  {   /* Add new patch number below this line */
+ /**/
+     373,
  /**/

-- 
EXPERIENCE - experience is a wonderful thing. It enables you to 
recognise a mistake when you make it again.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220904104301.A93941C0CF3%40moolenaar.net.

Raspunde prin e-mail lui