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:
Jan Edmund Lazo
2020-12-27 12:14:32 -05:00
parent ed0131e3d9
commit 883114e882
12 changed files with 44 additions and 50 deletions

View File

@@ -2032,7 +2032,7 @@ static char_u *next_fenc(char_u **pp, bool *alloced)
r = enc_canonize(*pp);
*pp += STRLEN(*pp);
} else {
r = vim_strnsave(*pp, (int)(p - *pp));
r = vim_strnsave(*pp, p - *pp);
*pp = p + 1;
p = enc_canonize(r);
xfree(r);