To: vim_dev@googlegroups.com Subject: Patch 9.0.0373 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///