]> granicus.if.org Git - vim/commitdiff
patch 8.2.0252: Windows compiler warns for using size_t v8.2.0252
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Feb 2020 19:31:28 +0000 (20:31 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Feb 2020 19:31:28 +0000 (20:31 +0100)
Problem:    Windows compiler warns for using size_t.
Solution:   Change to int. (Mike Williams)

src/version.c
src/vim9compile.c

index 8d43c79141c3e8e892f0e3d31b5f5a0d57856ef3..8ebbf491c5eb6914adaf3562e2f7bcfca59dfeb6 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    252,
 /**/
     251,
 /**/
index 96037d917f28f18b6b3cbc98ee7f8a63bfc5d026..c6201be900b4783e2c8f319e1d9bc12d263e8431 100644 (file)
@@ -4427,7 +4427,7 @@ compile_catch(char_u *arg, cctx_T *cctx UNUSED)
        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 UNUSED)
            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;