aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-10-21 22:38:48 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-10-21 23:24:54 +0200
commitf97496a21c5377990aeb65f940005159acd62a27 (patch)
tree56c13e9b5e865321809a34d58f4b89e8496749d7
parent2afebc4e5f551c7a4f7655d6d693a0ca745a6a31 (diff)
downloadrneovim-f97496a21c5377990aeb65f940005159acd62a27.tar.gz
rneovim-f97496a21c5377990aeb65f940005159acd62a27.tar.bz2
rneovim-f97496a21c5377990aeb65f940005159acd62a27.zip
fix warning: "Assigned value is garbage"
clang scan-build noticed that find_command() may bitmask `eap->flags`. cmd_can_preview() only uses `ea.cmdidx`, but let's fix the warning... Found by clang scan-build 5.0
-rw-r--r--src/nvim/ex_docmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 2a733f5831..5533c57adb 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -10048,6 +10048,7 @@ bool cmd_can_preview(char_u *cmd)
}
exarg_T ea;
+ memset(&ea, 0, sizeof(ea));
// parse the command line
ea.cmd = skip_range(cmd, NULL);
if (*ea.cmd == '*') {