summaryrefslogtreecommitdiff
path: root/src/libvterm
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-26 21:29:34 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-26 21:29:34 +0200
commita1b5b0928118b135f9917679c0da28175c845140 (patch)
treea4084145db9365e459794a3c320ff63c1b154ba8 /src/libvterm
parentf0a521f4f76904edb74e182c12732189b347ff68 (diff)
downloadvim-git-a1b5b0928118b135f9917679c0da28175c845140.tar.gz
patch 8.0.0777: compiler warnings with 64 bit compilerv8.0.0777
Problem: Compiler warnings with 64 bit compiler. Solution: Add type casts. (Mike Williams)
Diffstat (limited to 'src/libvterm')
-rw-r--r--src/libvterm/src/pen.c6
-rw-r--r--src/libvterm/src/state.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libvterm/src/pen.c b/src/libvterm/src/pen.c
index 81987f6bc..3c58c9cec 100644
--- a/src/libvterm/src/pen.c
+++ b/src/libvterm/src/pen.c
@@ -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;
diff --git a/src/libvterm/src/state.c b/src/libvterm/src/state.c
index 0c685309d..8f8909e2f 100644
--- a/src/libvterm/src/state.c
+++ b/src/libvterm/src/state.c
@@ -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);