Mercurial > vim
changeset 19388:3a579cadceb6 v8.2.0252
patch 8.2.0252: Windows compiler warns for using size_t
Commit: https://github.com/vim/vim/commit/3dd64608f6183a49c6854652017b928556224935
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 13 20:31:28 2020 +0100
patch 8.2.0252: Windows compiler warns for using size_t
Problem: Windows compiler warns for using size_t.
Solution: Change to int. (Mike Williams)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Feb 2020 20:45:09 +0100 |
parents | b3ca959badd3 |
children | e85beb3a479f |
files | src/version.c src/vim9compile.c |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 252, +/**/ 251, /**/ 250,
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -4427,7 +4427,7 @@ compile_catch(char_u *arg, cctx_T *cctx char_u *end; char_u *pat; char_u *tofree = NULL; - size_t len; + int len; // Push v:exception, push {expr} and MATCH generate_instr_type(cctx, ISN_PUSHEXC, &t_string); @@ -4440,9 +4440,9 @@ compile_catch(char_u *arg, cctx_T *cctx return FAIL; } if (tofree == NULL) - len = end - (p + 1); + len = (int)(end - (p + 1)); else - len = end - (tofree + 1); + len = (int)(end - (tofree + 1)); pat = vim_strnsave(p + 1, len); vim_free(tofree); p += len + 2;