summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctl-lib/ctl-lua.c2
-rw-r--r--ctl-lib/ctl-plugin.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c
index 3f3fe81..757956e 100644
--- a/ctl-lib/ctl-lua.c
+++ b/ctl-lib/ctl-lua.c
@@ -111,7 +111,7 @@ STATIC int LuaPushArgument (CtlSourceT *source, json_object *argsJ) {
break;
}
case json_type_array: {
- int length= json_object_array_length(argsJ);
+ size_t 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);
diff --git a/ctl-lib/ctl-plugin.c b/ctl-lib/ctl-plugin.c
index 705a2b4..2520d77 100644
--- a/ctl-lib/ctl-plugin.c
+++ b/ctl-lib/ctl-plugin.c
@@ -203,7 +203,7 @@ STATIC int PluginLoadOne (AFB_ApiT apiHandle, CtlPluginT *ctlPlugin, json_object
// look on l2c command and push them to LUA
if (json_object_get_type(lua2csJ) == json_type_array) {
- int length = json_object_array_length(lua2csJ);
+ size_t length = json_object_array_length(lua2csJ);
l2cFunc = calloc(length + ctlLua2cFunc->l2cCount + 1, sizeof (luaL_Reg));
for (count = 0; count < length; count++) {
int err;
@@ -267,7 +267,7 @@ PUBLIC int PluginConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *p
else
{
if (json_object_get_type(pluginsJ) == json_type_array) {
- int length = json_object_array_length(pluginsJ);
+ size_t length = json_object_array_length(pluginsJ);
ctlPlugins = calloc (length+1, sizeof(CtlPluginT));
for (int idx=0; idx < length; idx++) {
json_object *pluginJ = json_object_array_get_idx(pluginsJ, idx);