os/env: Fix “invalid pointer to local” false positive

This commit is contained in:
ZyX 2017-04-16 21:02:43 +03:00
parent dc523eed8e
commit 84aa457ccd

View File

@ -641,7 +641,7 @@ char *vim_getenv(const char *name)
exe_name, exe_name,
"share" _PATHSEPSTR "nvim" _PATHSEPSTR "runtime" _PATHSEPSTR, "share" _PATHSEPSTR "nvim" _PATHSEPSTR "runtime" _PATHSEPSTR,
MAXPATHL) == OK) { MAXPATHL) == OK) {
vim_path = exe_name; vim_path = exe_name; // -V507
} }
} }
} }
@ -675,6 +675,7 @@ char *vim_getenv(const char *name)
vim_path = NULL; vim_path = NULL;
} }
} }
assert(vim_path != exe_name);
} }
#ifdef HAVE_PATHDEF #ifdef HAVE_PATHDEF