From 81e7316616d130d4ef0c7c84d7c6f9b2157692de Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 21 Jul 2025 14:50:20 -0600 Subject: [PATCH] lua/bytevarlib: return luaL_error to suppress warning Even though luaL_error never returns, use a return to make it clear. Also prevents a compiler warning about idx being used uninitialized. --- src/util-lua-bytevarlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util-lua-bytevarlib.c b/src/util-lua-bytevarlib.c index bea9a4ce94..8564f94667 100644 --- a/src/util-lua-bytevarlib.c +++ b/src/util-lua-bytevarlib.c @@ -56,7 +56,7 @@ static int LuaBytevarMap(lua_State *L) DetectByteIndexType idx; if (!DetectByteRetrieveSMVar(name, s, -1, &idx)) { - luaL_error(L, "unknown byte_extract or byte_math variable: %s", name); + return luaL_error(L, "unknown byte_extract or byte_math variable: %s", name); } ld->bytevar[ld->bytevars].name = SCStrdup(name); -- 2.47.2