To: vim_dev@googlegroups.com Subject: Patch 8.2.3755 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3755 Problem: Coverity warns for using a buffer in another scope. Solution: Declare the buffer in a common scope. Files: src/evalvars.c *** ../vim-8.2.3754/src/evalvars.c 2021-12-06 11:03:50.946900217 +0000 --- src/evalvars.c 2021-12-07 11:01:53.632451487 +0000 *************** *** 1393,1398 **** --- 1393,1400 ---- int failed = FALSE; int opt_p_flags; char_u *tofree = NULL; + char_u numbuf[NUMBUFLEN]; + c1 = *p; *p = NUL; *************** *** 1416,1427 **** if (opt_p_flags & P_FUNC && (tv->v_type == VAR_PARTIAL || tv->v_type == VAR_FUNC)) { - char_u numbuf[NUMBUFLEN]; - // If the option can be set to a function reference or a lambda // and the passed value is a function reference, then convert it to // the name (string) of the function reference. - s = tv2string(tv, &tofree, numbuf, 0); } // Avoid setting a string option to the text "v:false" or similar. --- 1418,1426 ---- *** ../vim-8.2.3754/src/version.c 2021-12-06 19:50:57.706620019 +0000 --- src/version.c 2021-12-07 11:02:37.484353805 +0000 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 3755, /**/ -- An operatingsystem is just a name you give to the rest of bloating idiosyncratic machine-based-features you left out of your editor. (author unknown) /// 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 ///