# HG changeset patch # User Bram Moolenaar # Date 1580248803 -3600 # Node ID 1235c26d9f04e9b43c78535b1aec8fedc12f6a89 # Parent ee5cec77b9f01ac25c8c315d32627bf8e92764cb patch 8.2.0167: Coverity warning for ignoring return value Commit: https://github.com/vim/vim/commit/58ceca5cae75ed839b20a89c5fa9998f02552f58 Author: Bram Moolenaar Date: Tue Jan 28 22:46:22 2020 +0100 patch 8.2.0167: Coverity warning for ignoring return value Problem: Coverity warning for ignoring return value. Solution: Check the return value and jump if failed. diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -687,6 +687,8 @@ func Test_expr7_fails() call CheckDefFailure("let x = @", "E1002:") call CheckDefFailure("let x = @<", "E354:") + + call CheckDefFailure("let x = ¬exist", "E113:") endfunc let g:Funcrefs = [function('add')] diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 167, +/**/ 166, /**/ 165, diff --git a/src/vim9execute.c b/src/vim9execute.c --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -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; }