vim-patch:8.2.5077: various warnings from clang on MS-Windows (#27773)

Problem:    Various warnings from clang on MS-Windows.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes vim/vim#10553)

a34b4460c2

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq 2024-03-08 13:56:27 +08:00 committed by GitHub
parent 25124d3607
commit 6a580b997b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -586,6 +586,9 @@ void expand_env_esc(char *restrict srcp, char *restrict dst, int dstlen, bool es
bool copy_char;
bool mustfree; // var was allocated, need to free it later
bool at_start = true; // at start of a name
#if defined(BACKSLASH_IN_FILENAME)
char *const save_dst = dst;
#endif
int prefix_len = (prefix == NULL) ? 0 : (int)strlen(prefix);
@ -726,7 +729,7 @@ void expand_env_esc(char *restrict srcp, char *restrict dst, int dstlen, bool es
// with it, skip a character
if (after_pathsep(dst, dst + c)
#if defined(BACKSLASH_IN_FILENAME)
&& dst[-1] != ':'
&& (dst == save_dst || dst[-1] != ':')
#endif
&& vim_ispathsep(*tail)) {
tail++;