To: vim_dev@googlegroups.com Subject: Patch 8.1.1312 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1312 Problem: Coverity warning for using uninitialized variable. Solution: Clear exarg_T. Files: src/quickfix.c, src/channel.c, src/ex_cmds2.c *** ../vim-8.1.1311/src/quickfix.c 2019-05-05 21:00:22.854603956 +0200 --- src/quickfix.c 2019-05-09 21:45:56.322005593 +0200 *************** *** 5809,5814 **** --- 5809,5815 ---- { exarg_T ea; + vim_memset(&ea, 0, sizeof(ea)); ea.arg = target_dir; ea.cmdidx = CMD_lcd; ex_cd(&ea); *************** *** 6109,6114 **** --- 6110,6116 ---- // appropriate ex command and executing it. exarg_T ea; + vim_memset(&ea, 0, sizeof(ea)); ea.arg = dirname_start; ea.cmdidx = (curwin->w_localdir == NULL) ? CMD_cd : CMD_lcd; ex_cd(&ea); *** ../vim-8.1.1311/src/channel.c 2019-04-28 19:46:17.022060143 +0200 --- src/channel.c 2019-05-09 21:45:45.678054404 +0200 *************** *** 2308,2313 **** --- 2308,2314 ---- exarg_T ea; ch_log(channel, "Executing normal command '%s'", (char *)arg); + vim_memset(&ea, 0, sizeof(ea)); ea.arg = arg; ea.addr_count = 0; ea.forceit = TRUE; /* no mapping */ *************** *** 2318,2323 **** --- 2319,2325 ---- exarg_T ea; ch_log(channel, "redraw"); + vim_memset(&ea, 0, sizeof(ea)); ea.forceit = *arg != NUL; ex_redraw(&ea); showruler(FALSE); *** ../vim-8.1.1311/src/ex_cmds2.c 2019-05-08 21:58:54.446597033 +0200 --- src/ex_cmds2.c 2019-05-09 21:46:52.193747823 +0200 *************** *** 1190,1198 **** else ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1); ! /* Init ea pseudo-structure, this is needed for the check_overwrite() ! * function. */ ! ea.append = ea.forceit = FALSE; if (ret == VIM_YES) { --- 1190,1198 ---- else ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1); ! // Init ea pseudo-structure, this is needed for the check_overwrite() ! // function. ! vim_memset(&ea, 0, sizeof(ea)); if (ret == VIM_YES) { *** ../vim-8.1.1311/src/version.c 2019-05-09 21:38:39.775896532 +0200 --- src/version.c 2019-05-09 21:48:10.369383122 +0200 *************** *** 769,770 **** --- 769,772 ---- { /* Add new patch number below this line */ + /**/ + 1312, /**/ -- (letter from Mark to Mike, about the film's probable certificate) For an 'A' we would have to: Lose as many shits as possible; Take Jesus Christ out, if possible; Loose "I fart in your general direction"; Lose "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your testicles" "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///