mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
vim-patch:8.2.0928: many type casts are used for vim_strnsave()
Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes vim/vim#5633) Remove some type casts.df44a27b53
N/A patches for version.c: vim-patch:8.2.0315: build failure on HP-UX system Problem: Build failure on HP-UX system. Solution: Use LONG_LONG_MIN instead of LLONG_MIN. Add type casts for switch statement. (John Marriott)c593bec412
vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block.7acde51832
vim-patch:8.2.2229: build failure without the +eval feature Problem: build failure without the +eval feature. Solution: Add #ifdef.39cb2dab18
vim-patch:8.2.2232: compiler error for falling through into next case Problem: Compiler error for falling through into next case. Solution: Move FALLTHROUGH below the #endif9618a25b9c
This commit is contained in:
@@ -6553,7 +6553,7 @@ static void f_readfile(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
}
|
||||
if (prevlen == 0) {
|
||||
assert(len < INT_MAX);
|
||||
s = vim_strnsave(start, (int)len);
|
||||
s = vim_strnsave(start, len);
|
||||
} else {
|
||||
/* Change "prev" buffer to be the right size. This way
|
||||
* the bytes are only copied once, and very long lines are
|
||||
@@ -10855,7 +10855,7 @@ static void f_trim(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
}
|
||||
}
|
||||
}
|
||||
rettv->vval.v_string = vim_strnsave(head, (int)(tail - head));
|
||||
rettv->vval.v_string = vim_strnsave(head, tail - head);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -2297,9 +2297,9 @@ void ex_function(exarg_T *eap)
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
heredoc_trimmed =
|
||||
vim_strnsave(theline, (int)(skipwhite(theline) - theline));
|
||||
vim_strnsave(theline, skipwhite(theline) - theline);
|
||||
}
|
||||
skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p));
|
||||
skip_until = vim_strnsave(p, skiptowhite(p) - p);
|
||||
do_concat = false;
|
||||
is_heredoc = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user