Mercurial > vim
diff src/libvterm/src/state.c @ 11790:4dfebc1b2674 v8.0.0777
patch 8.0.0777: compiler warnings with 64 bit compiler
commit https://github.com/vim/vim/commit/a1b5b0928118b135f9917679c0da28175c845140
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 26 21:29:34 2017 +0200
patch 8.0.0777: compiler warnings with 64 bit compiler
Problem: Compiler warnings with 64 bit compiler.
Solution: Add type casts. (Mike Williams)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 26 Jul 2017 21:30:04 +0200 |
parents | 7846efd291d7 |
children | ca4931a20f8c |
line wrap: on
line diff
--- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -258,7 +258,7 @@ static int on_text(const char bytes[], s &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[], s #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);