Mercurial > vim
changeset 19372:967149bbd8d3 v8.2.0244
patch 8.2.0244: compiler warning in Lua interface
Commit: https://github.com/vim/vim/commit/5f1d3ae8a8264292a53aad099e78a9b4a7bad375
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 11 22:37:35 2020 +0100
patch 8.2.0244: compiler warning in Lua interface
Problem: Compiler warning in Lua interface.
Solution: Add type cast. (Ken Takata, closes https://github.com/vim/vim/issues/5621)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Feb 2020 22:45:03 +0100 |
parents | 53ee2ee9e831 |
children | 47e90f6458de |
files | src/if_lua.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if_lua.c +++ b/src/if_lua.c @@ -1148,7 +1148,7 @@ luaV_blob_add(lua_State *L) size_t i, l = 0; const char *s = lua_tolstring(L, 2, &l); - if (ga_grow(&b->bv_ga, l) == OK) + if (ga_grow(&b->bv_ga, (int)l) == OK) for (i = 0; i < l; ++i) ga_append(&b->bv_ga, s[i]); } @@ -1781,7 +1781,7 @@ luaV_blob(lua_State *L) size_t i, l = 0; const char *s = lua_tolstring(L, 1, &l); - if (ga_grow(&b->bv_ga, l) == OK) + if (ga_grow(&b->bv_ga, (int)l) == OK) for (i = 0; i < l; ++i) ga_append(&b->bv_ga, s[i]); }