0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 8.1.1312: Coverity warning for using uninitialized variable

Problem:    Coverity warning for using uninitialized variable.
Solution:   Clear exarg_T.
This commit is contained in:
Bram Moolenaar
2019-05-09 21:48:37 +02:00
parent 23b5139234
commit 4ca41534b7
4 changed files with 9 additions and 3 deletions

View File

@@ -2308,6 +2308,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
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,6 +2319,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
exarg_T ea;
ch_log(channel, "redraw");
vim_memset(&ea, 0, sizeof(ea));
ea.forceit = *arg != NUL;
ex_redraw(&ea);
showruler(FALSE);