From: Philippe Antoine Date: Sun, 4 May 2025 19:12:36 +0000 (+0200) Subject: util/lua: fix new -Wshorten-64-to-32 warning X-Git-Tag: suricata-8.0.0-rc1~344 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1bca4a9b937cbd3750ccd2ef0c082aacf6d8cb9;p=thirdparty%2Fsuricata.git util/lua: fix new -Wshorten-64-to-32 warning Ticket: 6186 --- diff --git a/src/util-lua-flowintlib.c b/src/util-lua-flowintlib.c index ff42d08ba5..101ae43d5a 100644 --- a/src/util-lua-flowintlib.c +++ b/src/util-lua-flowintlib.c @@ -97,7 +97,7 @@ static int LuaFlowintValue(lua_State *L) static int LuaFlowintSet(lua_State *L) { - const int value = luaL_checkinteger(L, 2); + const int value = (int)luaL_checkinteger(L, 2); uint32_t *flowvar_id = luaL_checkudata(L, 1, suricata_flowint_mt); Flow *f = LuaStateGetFlow(L); if (f == NULL) { diff --git a/src/util-lua-flowvarlib.c b/src/util-lua-flowvarlib.c index d81f18f95f..19d15fc9c0 100644 --- a/src/util-lua-flowvarlib.c +++ b/src/util-lua-flowvarlib.c @@ -99,7 +99,7 @@ static int LuaFlowvarValue(lua_State *L) static int LuaFlowvarSet(lua_State *L) { const char *value = luaL_checkstring(L, 2); - const int len = luaL_checkinteger(L, 3); + const int len = (int)luaL_checkinteger(L, 3); uint32_t *flowvar_id = luaL_checkudata(L, 1, suricata_flowvar_mt); Flow *f = LuaStateGetFlow(L); if (f == NULL) {