0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.0777: compiler warnings with 64 bit compiler

Problem:    Compiler warnings with 64 bit compiler.
Solution:   Add type casts. (Mike Williams)
This commit is contained in:
Bram Moolenaar
2017-07-26 21:29:34 +02:00
parent f0a521f4f7
commit a1b5b09281
4 changed files with 14 additions and 11 deletions

View File

@@ -80,9 +80,9 @@ static int lookup_colour(const VTermState *state, int palette, const long args[]
if(argcount < 3)
return argcount;
col->red = CSI_ARG(args[0]);
col->green = CSI_ARG(args[1]);
col->blue = CSI_ARG(args[2]);
col->red = (uint8_t)CSI_ARG(args[0]);
col->green = (uint8_t)CSI_ARG(args[1]);
col->blue = (uint8_t)CSI_ARG(args[2]);
return 3;

View File

@@ -258,7 +258,7 @@ static int on_text(const char bytes[], size_t len, void *user)
&state->encoding[state->gr_set];
(*encoding->enc->decode)(encoding->enc, encoding->data,
codepoints, &npoints, state->gsingle_set ? 1 : len,
codepoints, &npoints, state->gsingle_set ? 1 : (int)len,
bytes, &eaten, len);
/* There's a chance an encoding (e.g. UTF-8) hasn't found enough bytes yet
@@ -411,7 +411,7 @@ static int on_text(const char bytes[], size_t len, void *user)
#endif
vterm_allocator_free(state->vt, codepoints);
return eaten;
return (int)eaten;
}
static int on_control(unsigned char control, void *user)
@@ -1680,7 +1680,7 @@ VTermState *vterm_obtain_state(VTerm *vt)
state->lineinfo = vterm_allocator_malloc(state->vt, state->rows * sizeof(VTermLineInfo));
state->encoding_utf8.enc = vterm_lookup_encoding(ENC_UTF8, 'u');
if(*state->encoding_utf8.enc->init)
if(*state->encoding_utf8.enc->init != NULL)
(*state->encoding_utf8.enc->init)(state->encoding_utf8.enc, state->encoding_utf8.data);
vterm_parser_set_callbacks(vt, &parser_callbacks, state);