From d0253b51ca38dde4358446edf92e2baeafa5f12f Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Tue, 22 May 2018 10:51:52 +0200 Subject: Fixed compilation warnings with gcc-7.2.0 Replaced some 'size_t' by 'int' Change-Id: Iaf58b4b65f9aa2e82c0a87af45f21ca62fa4d84e Signed-off-by: Thierry Bultel --- ctl-lib/ctl-lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ctl-lib/ctl-lua.c') diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c index 15e1fd8..7008cc4 100644 --- a/ctl-lib/ctl-lua.c +++ b/ctl-lib/ctl-lua.c @@ -114,7 +114,7 @@ static int LuaPushArgument(CtlSourceT *source, json_object *argsJ) { } case json_type_array: { - size_t length = json_object_array_length(argsJ); + int length = json_object_array_length(argsJ); lua_newtable(luaState); for (int idx = 0; idx < length; idx++) { json_object *val = json_object_array_get_idx(argsJ, idx); @@ -861,7 +861,7 @@ static int LuaDoString(const char *script, CtlSourceT *source) { // Execute LUA code from received API request static void LuaDoAction(LuaDoActionT action, AFB_ReqT request) { - int err, count = 0; + int err = 0, count = 0; CtlSourceT *source = alloca(sizeof (CtlSourceT)); source->request = request; -- cgit 1.2.3-korg