From: nhmall Date: Wed, 1 Apr 2020 16:58:36 +0000 (-0400) Subject: quiet windows x86 warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3bfb5a6c35df955d66712cfc9f2e50febff91864;p=nethack quiet windows x86 warnings nhlua.c(628): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data nhlua.c(644): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data nhlua.c(646): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data --- diff --git a/src/nhlua.c b/src/nhlua.c index 0e5fb08de..a8ec32edb 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -625,7 +625,7 @@ lua_State *L; int argc = lua_gettop(L); if (argc == 1) - lua_pushinteger(L, rn2(luaL_checkinteger(L, 1))); + lua_pushinteger(L, rn2((int) luaL_checkinteger(L, 1))); else nhl_error(L, "Wrong args"); @@ -641,9 +641,9 @@ lua_State *L; int argc = lua_gettop(L); if (argc == 1) - lua_pushinteger(L, rn2(luaL_checkinteger(L, 1))); + lua_pushinteger(L, rn2((int) luaL_checkinteger(L, 1))); else if (argc == 2) - lua_pushinteger(L, luaL_checkinteger(L, 1) + rn2(luaL_checkinteger(L, 2))); + lua_pushinteger(L, luaL_checkinteger(L, 1) + rn2((int) luaL_checkinteger(L, 2))); else nhl_error(L, "Wrong args");