diff src/channel.c @ 16619:8f0ea605ec96 v8.1.1312

patch 8.1.1312: Coverity warning for using uninitialized variable commit https://github.com/vim/vim/commit/4ca41534b726c4116d2e430e877e34146b4d4831 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 9 21:48:37 2019 +0200 patch 8.1.1312: Coverity warning for using uninitialized variable Problem: Coverity warning for using uninitialized variable. Solution: Clear exarg_T.
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 May 2019 22:00:06 +0200
parents 7ae2396cef62
children a1ba0bd74e7d
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -2308,6 +2308,7 @@ channel_exe_cmd(channel_T *channel, ch_p
 	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_p
 	exarg_T ea;
 
 	ch_log(channel, "redraw");
+	vim_memset(&ea, 0, sizeof(ea));
 	ea.forceit = *arg != NUL;
 	ex_redraw(&ea);
 	showruler(FALSE);