]> granicus.if.org Git - vim/commitdiff
patch 8.2.1532: compiler warning for conversion of size_t to long v8.2.1532
authorBram Moolenaar <Bram@vim.org>
Fri, 28 Aug 2020 14:38:11 +0000 (16:38 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 28 Aug 2020 14:38:11 +0000 (16:38 +0200)
Problem:    Compiler warning for conversion of size_t to long.
Solution:   Add type cast.

src/eval.c
src/version.c

index 2d2ad1b5fa2b8399c6c7940dcad5b034735320a8..d12708e226893278a111ef9be7c5a78f5b2f2be8 100644 (file)
@@ -5392,7 +5392,7 @@ string_slice(char_u *str, varnumber_T first, varnumber_T last)
     if (start_byte < 0)
        start_byte = 0; // first index very negative: use zero
     if (last == -1)
-       end_byte = slen;
+       end_byte = (long)slen;
     else
     {
        end_byte = char_idx2byte(str, slen, last);
index 35bb3c397262b33a9db5ab3a6859f9595296a61a..ba62765bc9211cf23a2da79ab31ec22bf9193472 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1532,
 /**/
     1531,
 /**/