comparison src/libvterm/src/pen.c @ 20555:eedaa9a30ab4 v8.2.0831

patch 8.2.0831: compiler warnings for integer sizes Commit: https://github.com/vim/vim/commit/f4b68e9056f8ddb64c3d7141df138fe099575abf Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 27 21:22:14 2020 +0200 patch 8.2.0831: compiler warnings for integer sizes Problem: Compiler warnings for integer sizes. Solution: Add type casts. (Mike Williams)
author Bram Moolenaar <Bram@vim.org>
date Wed, 27 May 2020 21:30:04 +0200
parents a4652d7ec99f
children bc81b275d4d6
comparison
equal deleted inserted replaced
20554:296fd130e061 20555:eedaa9a30ab4
45 static void lookup_default_colour_ansi(long idx, VTermColor *col) 45 static void lookup_default_colour_ansi(long idx, VTermColor *col)
46 { 46 {
47 vterm_color_rgb( 47 vterm_color_rgb(
48 col, 48 col,
49 ansi_colors[idx].red, ansi_colors[idx].green, ansi_colors[idx].blue); 49 ansi_colors[idx].red, ansi_colors[idx].green, ansi_colors[idx].blue);
50 col->index = idx; 50 col->index = (uint8_t)idx;
51 col->type = VTERM_COLOR_INDEXED; 51 col->type = VTERM_COLOR_INDEXED;
52 } 52 }
53 53
54 static int lookup_colour_ansi(const VTermState *state, long index, VTermColor *col) 54 static int lookup_colour_ansi(const VTermState *state, long index, VTermColor *col)
55 { 55 {
94 switch(palette) { 94 switch(palette) {
95 case 2: // RGB mode - 3 args contain colour values directly 95 case 2: // RGB mode - 3 args contain colour values directly
96 if(argcount < 3) 96 if(argcount < 3)
97 return argcount; 97 return argcount;
98 98
99 vterm_color_rgb(col, CSI_ARG(args[0]), CSI_ARG(args[1]), CSI_ARG(args[2])); 99 vterm_color_rgb(col, (uint8_t)CSI_ARG(args[0]), (uint8_t)CSI_ARG(args[1]), (uint8_t)CSI_ARG(args[2]));
100 100
101 return 3; 101 return 3;
102 102
103 case 5: // XTerm 256-colour mode 103 case 5: // XTerm 256-colour mode
104 if (!argcount || CSI_ARG_IS_MISSING(args[0])) { 104 if (!argcount || CSI_ARG_IS_MISSING(args[0])) {