aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-27 12:14:32 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-27 14:05:41 -0500
commit883114e8824ecf5094faa2c860bd1379228d209f (patch)
tree4cfa4e02744ad97a2f03c2bfec397bbb0a4cdc6b /src/nvim/regexp.c
parented0131e3d941edce315bc115b68ebf33bf6eaf31 (diff)
downloadrneovim-883114e8824ecf5094faa2c860bd1379228d209f.tar.gz
rneovim-883114e8824ecf5094faa2c860bd1379228d209f.tar.bz2
rneovim-883114e8824ecf5094faa2c860bd1379228d209f.zip
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. https://github.com/vim/vim/commit/df44a27b53586fccfc6a3aedc89061fdd9a515ff 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) https://github.com/vim/vim/commit/c593bec4120f122e8a9129ec461968f1bd214435 vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a vim-patch:8.2.2229: build failure without the +eval feature Problem: build failure without the +eval feature. Solution: Add #ifdef. https://github.com/vim/vim/commit/39cb2dab18e85fc60f116a4543e433616872b690 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 https://github.com/vim/vim/commit/9618a25b9c054f0ee4e267d2db96b6e7c113ed7a
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index fb08cd2727..a2589ac431 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -3724,8 +3724,7 @@ static long regtry(bt_regprog_T *prog,
} else {
if (reg_startzp[i] != NULL && reg_endzp[i] != NULL)
re_extmatch_out->matches[i] =
- vim_strnsave(reg_startzp[i],
- (int)(reg_endzp[i] - reg_startzp[i]));
+ vim_strnsave(reg_startzp[i], reg_endzp[i] - reg_startzp[i]);
}
}
}
@@ -6565,7 +6564,7 @@ static int fill_submatch_list(int argc FUNC_ATTR_UNUSED, typval_T *argv,
if (s == NULL || rsm.sm_match->endp[i] == NULL) {
s = NULL;
} else {
- s = vim_strnsave(s, (int)(rsm.sm_match->endp[i] - s));
+ s = vim_strnsave(s, rsm.sm_match->endp[i] - s);
}
TV_LIST_ITEM_TV(li)->v_type = VAR_STRING;
TV_LIST_ITEM_TV(li)->vval.v_string = s;
@@ -7084,7 +7083,7 @@ char_u *reg_submatch(int no)
if (s == NULL || rsm.sm_match->endp[no] == NULL) {
retval = NULL;
} else {
- retval = vim_strnsave(s, (int)(rsm.sm_match->endp[no] - s));
+ retval = vim_strnsave(s, rsm.sm_match->endp[no] - s);
}
}