From ea7491586fccb2ce6de43b77fd0bd06b6dbaa17d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 16 Jan 2019 00:10:41 +0100 Subject: PVS/V1032: pointer cast to a more strictly aligned type --- src/nvim/ex_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 85844c37bd..7bc9a9244f 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -4895,7 +4895,7 @@ int find_help_tags(const char_u *arg, int *num_matches, char_u ***matches, } } - *matches = (char_u **)""; + *matches = &vim_emptystr; *num_matches = 0; int flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE; if (keep_lang) { -- cgit From aa39fc56f68e2087a2327bcd03cc5f3d2dc9a696 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 17 Jan 2019 23:43:43 +0100 Subject: PVS/V1032: pointer cast to a more strictly aligned type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rework-of: ea7491586fcc Helped-by: Björn Linse - The old (Vim) use of (char_u **)"" before ea7491586fcc is garbage, which hints that this value was never used. - The necessary condition is next to the NULL assigmnent, the pointer would only be started to be accessed, if the length assignment next to it is also changed. --- src/nvim/ex_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 7bc9a9244f..c574ac10e9 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -4895,7 +4895,7 @@ int find_help_tags(const char_u *arg, int *num_matches, char_u ***matches, } } - *matches = &vim_emptystr; + *matches = NULL; *num_matches = 0; int flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE; if (keep_lang) { -- cgit