diff mbox series

Lua: fix compiler warning

Message ID 20240712130242.17901-1-ceggers@arri.de
State Accepted
Headers show
Series Lua: fix compiler warning | expand

Commit Message

Christian Eggers July 12, 2024, 1:02 p.m. UTC
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 <ceggers@arri.de>
---
 include/lua_util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Glembotzki July 17, 2024, 6:55 a.m. UTC | #1
Reviewed-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>

Christian Eggers schrieb am Freitag, 12. Juli 2024 um 15:02:58 UTC+2:

> 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
>
>
diff mbox series

Patch

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,