mirror of
https://github.com/neovim/neovim.git
synced 2025-12-02 06:53:05 +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 #endif
9618a25b9c
This commit is contained in:
@@ -5422,7 +5422,7 @@ static int get_literal_key(char_u **arg, typval_T *tv)
|
||||
for (p = *arg; ASCII_ISALNUM(*p) || *p == '_' || *p == '-'; p++) {
|
||||
}
|
||||
tv->v_type = VAR_STRING;
|
||||
tv->vval.v_string = vim_strnsave(*arg, (int)(p - *arg));
|
||||
tv->vval.v_string = vim_strnsave(*arg, p - *arg);
|
||||
|
||||
*arg = skipwhite(p);
|
||||
return OK;
|
||||
@@ -10264,9 +10264,6 @@ repeat:
|
||||
if (src[*usedlen] == ':'
|
||||
&& (src[*usedlen + 1] == 's'
|
||||
|| (src[*usedlen + 1] == 'g' && src[*usedlen + 2] == 's'))) {
|
||||
char_u *str;
|
||||
char_u *pat;
|
||||
char_u *sub;
|
||||
int sep;
|
||||
char_u *flags;
|
||||
int didit = FALSE;
|
||||
@@ -10283,13 +10280,13 @@ repeat:
|
||||
// find end of pattern
|
||||
p = vim_strchr(s, sep);
|
||||
if (p != NULL) {
|
||||
pat = vim_strnsave(s, (int)(p - s));
|
||||
char_u *const pat = vim_strnsave(s, p - s);
|
||||
s = p + 1;
|
||||
// find end of substitution
|
||||
p = vim_strchr(s, sep);
|
||||
if (p != NULL) {
|
||||
sub = vim_strnsave(s, (int)(p - s));
|
||||
str = vim_strnsave(*fnamep, *fnamelen);
|
||||
char_u *const sub = vim_strnsave(s, p - s);
|
||||
char_u *const str = vim_strnsave(*fnamep, *fnamelen);
|
||||
*usedlen = (size_t)(p + 1 - src);
|
||||
s = do_string_sub(str, pat, sub, NULL, flags);
|
||||
*fnamep = s;
|
||||
|
||||
Reference in New Issue
Block a user