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/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/path.c') diff --git a/src/nvim/path.c b/src/nvim/path.c index 7f5dbe5c02..03de914e4f 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1267,7 +1267,7 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file, } *num_file = ga.ga_len; - *file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data : &vim_emptystr; + *file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data : NULL; recursive = false; -- cgit