]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0169: Coverity warning for dead code v8.2.0169
authorBram Moolenaar <Bram@vim.org>
Tue, 28 Jan 2020 21:59:45 +0000 (22:59 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 28 Jan 2020 21:59:45 +0000 (22:59 +0100)
Problem:    Coverity warning for dead code.
Solution:   Check if inside try-finally.

src/version.c
src/vim9execute.c

index 231640caa71812a851ba84a4419c8af570ae3a35..55602669f267e35cc40a5b730cc166f4daa221cb 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    169,
 /**/
     168,
 /**/
index 480f1ec565c2a5589f49bc41c8b367cad14cabc7..6e003d9389c065002622a23a0a56bbe469d3e601 100644 (file)
@@ -851,6 +851,11 @@ call_def_function(
            // return from a :def function call
            case ISN_RETURN:
                {
+                   garray_T    *trystack = &ectx.ec_trystack;
+
+                   if (trystack->ga_len > 0)
+                       trycmd = ((trycmd_T *)trystack->ga_data)
+                                                       + trystack->ga_len - 1;
                    if (trycmd != NULL && trycmd->tcd_frame == ectx.ec_frame
                            && trycmd->tcd_finally_idx != 0)
                    {