aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-25 13:41:17 +0800
committerGitHub <noreply@github.com>2022-08-25 13:41:17 +0800
commit170617c7a2183f9d5df84bfc89317be44ec9ac2e (patch)
tree82c16936e0dc10509e2e7b1ab799511e44ace410 /src/nvim/cmdexpand.c
parente4e0e8ce6f282ad891d3e9b7cd66961d23e7cba3 (diff)
parent6584f3a2b69b901900b9f267d62e06efbc15fec1 (diff)
downloadrneovim-170617c7a2183f9d5df84bfc89317be44ec9ac2e.tar.gz
rneovim-170617c7a2183f9d5df84bfc89317be44ec9ac2e.tar.bz2
rneovim-170617c7a2183f9d5df84bfc89317be44ec9ac2e.zip
Merge pull request #19939 from zeertzjq/vim-8.2.4289
vim-patch: compiler warnings
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index 5a53175b4a..50a84595fc 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -1939,13 +1939,12 @@ static int ExpandFromContext(expand_T *xp, char_u *pat, int *num_file, char ***f
|| xp->xp_context == EXPAND_FILES_IN_PATH) {
// Expand file or directory names.
bool free_pat = false;
- int i;
// for ":set path=" and ":set tags=" halve backslashes for escaped space
if (xp->xp_backslash != XP_BS_NONE) {
free_pat = true;
pat = vim_strsave(pat);
- for (i = 0; pat[i]; i++) {
+ for (int i = 0; pat[i]; i++) {
if (pat[i] == '\\') {
if (xp->xp_backslash == XP_BS_THREE
&& pat[i + 1] == '\\'
@@ -1979,8 +1978,8 @@ static int ExpandFromContext(expand_T *xp, char_u *pat, int *num_file, char ***f
}
#ifdef BACKSLASH_IN_FILENAME
if (p_csl[0] != NUL && (options & WILD_IGNORE_COMPLETESLASH) == 0) {
- for (int i = 0; i < *num_file; i++) {
- char_u *ptr = (*file)[i];
+ for (int j = 0; j < *num_file; j++) {
+ char_u *ptr = (*file)[j];
while (*ptr != NUL) {
if (p_csl[0] == 's' && *ptr == '\\') {
*ptr = '/';