]> granicus.if.org Git - vim/commitdiff
patch 8.2.2826: compiler warnings for int to size_t conversion v8.2.2826
authorBram Moolenaar <Bram@vim.org>
Mon, 3 May 2021 16:57:05 +0000 (18:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 3 May 2021 16:57:05 +0000 (18:57 +0200)
Problem:    Compiler warnings for int to size_t conversion. (Randall W.
            Morris)
Solution:   Add type casts.

src/map.c
src/quickfix.c
src/version.c

index 31742c13b30d45018e9eafe3113a89db2cc7e869..2e792feaa0fae8eb5692d5fc98f8549c41e47086 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -1552,7 +1552,7 @@ check_abbr(
                        escaped = vim_strsave_escape_csi(tb + j);
                        if (escaped != NULL)
                        {
-                           newlen = STRLEN(escaped);
+                           newlen = (int)STRLEN(escaped);
                            mch_memmove(tb + j, escaped, newlen);
                            j += newlen;
                            vim_free(escaped);
index 270810c314ae0f074613a3847c41d3912d741aca..9237b4b8146fe6448ed6c8d2a770f67e842f8a5f 100644 (file)
@@ -5921,7 +5921,7 @@ vgr_match_buflines(
     int                found_match = FALSE;
     long       lnum;
     colnr_T    col;
-    int                pat_len = STRLEN(spat);
+    int                pat_len = (int)STRLEN(spat);
 
     for (lnum = 1; lnum <= buf->b_ml.ml_line_count && *tomatch > 0; ++lnum)
     {
index a72cd3c05e045a5ceccd6400ea747627a2ddae06..82875de78ad6045bdba2268296faa1756bec41bf 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2826,
 /**/
     2825,
 /**/