Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[PATCH] Lua: fix compiler warning

17 views
Skip to first unread message

Christian Eggers

unread,
Jul 12, 2024, 9:02:58 AM7/12/24
to swup...@googlegroups.com, Christian Eggers
In contrast to C++, the C language requires an explicit 'void' if a
function expects no arguments.

Fixes: f91abdc8674d ("Lua: Sessionize Lua Handlers")
Signed-off-by: Christian Eggers <ceg...@arri.de>
---
include/lua_util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/lua_util.h b/include/lua_util.h
index d82a76d2c29a..55240e414efb 100644
--- a/include/lua_util.h
+++ b/include/lua_util.h
@@ -101,7 +101,7 @@ struct img_type;
#define lua_exit(L)
#define lua_close(L)
static inline lua_State *lua_session_init(struct dict __attribute__ ((__unused__)) *bootenv) { return NULL;}
-static inline int lua_init() { return 0; }
+static inline int lua_init(void) { return 0; }
static inline int lua_load_buffer(lua_State __attribute__ ((__unused__)) *L,
const char __attribute__ ((__unused__)) *buf) {return 1;}
static inline int lua_parser_fn(lua_State __attribute__ ((__unused__)) *L,
--
2.43.0

Michael Glembotzki

unread,
Jul 17, 2024, 2:55:23 AM7/17/24
to swupdate
Reviewed-by: Michael Glembotzki <Michael.G...@iris-sensing.com>
Reply all
Reply to author
Forward
0 new messages