From bcd9efc10d60e5f83218378fdd0a3ee847fb9c75 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Fri, 25 May 2018 11:16:50 +0200 Subject: Fixed build warnings with gcc >= 7.3 Reduced the number of warnings in native host configuration (here Tumbleweed) in order to not hide true/real warnings that may appear in the future. Signed-off-by: Sebastien Douheret --- ctl-lib/ctl-plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ctl-lib/ctl-plugin.c') diff --git a/ctl-lib/ctl-plugin.c b/ctl-lib/ctl-plugin.c index 505daf1..5562b83 100644 --- a/ctl-lib/ctl-plugin.c +++ b/ctl-lib/ctl-plugin.c @@ -202,7 +202,7 @@ static int LoadFoundPlugins(AFB_ApiT apiHandle, json_object *scanResult, json_ob if (!json_object_is_type(scanResult, json_type_array)) return -1; - len = json_object_array_length(scanResult); + len = (int)json_object_array_length(scanResult); for (i = 0; i < len; ++i) { object = json_object_array_get_idx(scanResult, i); @@ -381,7 +381,7 @@ int PluginConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *pluginsJ else { if (json_object_get_type(pluginsJ) == json_type_array) { - length = json_object_array_length(pluginsJ); + length = (int)json_object_array_length(pluginsJ); ctlPlugins = calloc (length+1, sizeof(CtlPluginT)); for (idx=0; idx < length; idx++) { json_object *pluginJ = json_object_array_get_idx(pluginsJ, idx); -- cgit 1.2.3-korg