]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0167: Coverity warning for ignoring return value v8.2.0167
authorBram Moolenaar <Bram@vim.org>
Tue, 28 Jan 2020 21:46:22 +0000 (22:46 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 28 Jan 2020 21:46:22 +0000 (22:46 +0100)
Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and jump if failed.

src/testdir/test_vim9_expr.vim
src/version.c
src/vim9execute.c

index ea79c045724752cbb21766cd634b383571a2113e..321dbf95ab5fc085877e08e6e01f577b04c561d1 100644 (file)
@@ -687,6 +687,8 @@ func Test_expr7_fails()
 
   call CheckDefFailure("let x = @", "E1002:")
   call CheckDefFailure("let x = @<", "E354:")
+
+  call CheckDefFailure("let x = &notexist", "E113:")
 endfunc
 
 let g:Funcrefs = [function('add')]
index d5108d9787ceaf119a55144982858f4a0ea56b05..c6259bc9f5ef7275ad3a167c400fa27814e95a80 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    167,
 /**/
     166,
 /**/
index 001d2741105ef33ddcb54295356e0eef098fe421..6865ba1e24acb3a23807c815e7f0f93fdbe8763c 100644 (file)
@@ -556,7 +556,8 @@ call_def_function(
 
                    if (ga_grow(&ectx.ec_stack, 1) == FAIL)
                        goto failed;
-                   get_option_tv(&name, &optval, TRUE);
+                   if (get_option_tv(&name, &optval, TRUE) == FAIL)
+                       goto failed;
                    *STACK_TV_BOT(0) = optval;
                    ++ectx.ec_stack.ga_len;
                }