diff mbox series

[13/13] Fix warnings in case CONFIG_LUA is not set

Message ID 20240221082221.11997-14-stefano.babic@swupdate.org
State Accepted
Delegated to: Stefano Babic
Headers show
Series Extend Lua Environemnt and post-failure scripts | expand

Commit Message

Stefano Babic Feb. 21, 2024, 8:22 a.m. UTC
Add dummy lua_close() to avoid warnings in the parser.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 include/lua_util.h | 3 +++
 1 file changed, 3 insertions(+)

--
2.34.1
diff mbox series

Patch

diff --git a/include/lua_util.h b/include/lua_util.h
index 7b34eb89..bf8d2b0e 100644
--- a/include/lua_util.h
+++ b/include/lua_util.h
@@ -81,8 +81,11 @@  void luaL_pushresult(luaL_Buffer_52 *B);

 #else

+struct img_type;
+
 #define lua_State void
 #define lua_exit(L)
+#define lua_close(L)
 static inline lua_State *lua_init(struct dict __attribute__ ((__unused__)) *bootenv) { return NULL;}
 static inline int lua_load_buffer(lua_State __attribute__ ((__unused__)) *L,
 					const char __attribute__ ((__unused__)) *buf) {return 1;}