From 041b40c1cdb33052b48bcec8050fa9bcdaaadce2 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 21 Sep 2021 23:09:33 +0800 Subject: fix compile errors --- core/src/xmake/os/find.c | 4 ++-- core/src/xmake/winos/registry_keys.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src') diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c index 9d6a17eff..28539a138 100644 --- a/core/src/xmake/os/find.c +++ b/core/src/xmake/os/find.c @@ -177,10 +177,10 @@ tb_int_t xm_os_find(lua_State* lua) tb_check_return_val(pattern, 0); // the recursion level - tb_long_t recursion = lua_tointeger(lua, 3); + tb_long_t recursion = (tb_long_t)lua_tointeger(lua, 3); // the match mode - tb_long_t mode = lua_tointeger(lua, 4); + tb_long_t mode = (tb_long_t)lua_tointeger(lua, 4); // init table lua_newtable(lua); diff --git a/core/src/xmake/winos/registry_keys.c b/core/src/xmake/winos/registry_keys.c index 234cdf035..9c3467210 100644 --- a/core/src/xmake/winos/registry_keys.c +++ b/core/src/xmake/winos/registry_keys.c @@ -172,7 +172,7 @@ tb_int_t xm_winos_registry_keys(lua_State* lua) // get the arguments tb_char_t const* rootkey = luaL_checkstring(lua, 1); tb_char_t const* rootdir = luaL_checkstring(lua, 2); - tb_long_t recursion = lua_tointeger(lua, 3); + tb_long_t recursion = (tb_long_t)lua_tointeger(lua, 3); tb_bool_t is_function = lua_isfunction(lua, 4); tb_check_return_val(rootkey && rootdir && is_function, 0); -- cgit v1.3.1