patch 8.2.5077: various warnings from clang on MS-Windows
Problem: Various warnings from clang on MS-Windows.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #10553)
diff --git a/src/filepath.c b/src/filepath.c
index 3f7825c..654d03a 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -191,7 +191,8 @@
}
// concat the not-shortened part of the path
- vim_strncpy(*fname + len, endp, sfx_len);
+ if ((*fname + len) != endp)
+ vim_strncpy(*fname + len, endp, sfx_len);
(*fname)[new_len] = NUL;
}