diff src/vim9execute.c @ 27918:7d70b420de00 v8.2.4484

patch 8.2.4484: Vim9: some error messages are not tested Commit: https://github.com/vim/vim/commit/1983f1aa315711852174be1b7089f71e24c19e27 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 28 20:55:02 2022 +0000 patch 8.2.4484: Vim9: some error messages are not tested Problem: Vim9: some error messages are not tested. Solution: Add a few more test cases. Delete dead code.
author Bram Moolenaar <Bram@vim.org>
date Mon, 28 Feb 2022 22:00:02 +0100
parents 5ce69c07a106
children e6e3abc28c7a
line wrap: on
line diff
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1027,7 +1027,7 @@ call_by_name(
     {
 	int func_idx = find_internal_func(name);
 
-	if (func_idx < 0)
+	if (func_idx < 0)  // Impossible?
 	    return FAIL;
 	if (check_internal_func(func_idx, argcount) < 0)
 	    return FAIL;
@@ -1452,8 +1452,6 @@ get_split_sourceline(
     char_u		*p;
     char_u		*line;
 
-    if (*sp->nextline == NUL)
-	return NULL;
     p = vim_strchr(sp->nextline, '\n');
     if (p == NULL)
     {
@@ -1911,11 +1909,11 @@ execute_storerange(isn_T *iptr, ectx_T *
 	    else
 		n2 = (long)tv_get_number_chk(tv_idx2, &error);
 	    if (error)
-		status = FAIL;
+		status = FAIL; // cannot happen?
 	    else
 	    {
 		listitem_T *li1 = check_range_index_one(
-			tv_dest->vval.v_list, &n1, FALSE);
+					     tv_dest->vval.v_list, &n1, FALSE);
 
 		if (li1 == NULL)
 		    status = FAIL;