]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0831: compiler warnings for integer sizes v8.2.0831
authorBram Moolenaar <Bram@vim.org>
Wed, 27 May 2020 19:22:14 +0000 (21:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 27 May 2020 19:22:14 +0000 (21:22 +0200)
Problem:    Compiler warnings for integer sizes.
Solution:   Add type casts. (Mike Williams)

src/libvterm/src/pen.c
src/terminal.c
src/version.c

index d3738b919176843453fa811b9b0a77d43e29d001..173f64f68276f531738d7e9a1f44a96f01867517 100644 (file)
@@ -47,7 +47,7 @@ static void lookup_default_colour_ansi(long idx, VTermColor *col)
   vterm_color_rgb(
       col,
       ansi_colors[idx].red, ansi_colors[idx].green, ansi_colors[idx].blue);
-  col->index = idx;
+  col->index = (uint8_t)idx;
   col->type = VTERM_COLOR_INDEXED;
 }
 
@@ -96,7 +96,7 @@ static int lookup_colour(const VTermState *state, int palette, const long args[]
     if(argcount < 3)
       return argcount;
 
-    vterm_color_rgb(col, CSI_ARG(args[0]), CSI_ARG(args[1]), CSI_ARG(args[2]));
+    vterm_color_rgb(col, (uint8_t)CSI_ARG(args[0]), (uint8_t)CSI_ARG(args[1]), (uint8_t)CSI_ARG(args[2]));
 
     return 3;
 
index 0a5ccbc597117d9d657204edb3bb0d76f67dc4bf..52f8105cacf78cb5da9a6e57483de415338ee335 100644 (file)
@@ -4230,7 +4230,7 @@ parse_osc(int command, VTermStringFragment frag, void *user)
        return 1;
     }
     mch_memmove((char *)gap->ga_data + gap->ga_len, frag.str, frag.len);
-    gap->ga_len += frag.len;
+    gap->ga_len += (int)frag.len;
     if (!frag.final)
        return 1;
 
index f088e61227c50e85c11f4b9b4351aab0dfd5d66e..f939822cd12729e9770c3ac1571bfbacb0c044ec 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    831,
 /**/
     830,
 /**/