summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.c
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-05-25 11:16:50 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:55 +0100
commit17663dd0e59dd806187069dfe373998d4cd941ed (patch)
tree1b4574719c7566fb4870346aec1dc0b2ee04535b /ctl-lib/ctl-config.c
parent4ea30343c03ecce8cf2778afc4393dd700122ea5 (diff)
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 <sebastien.douheret@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-config.c')
-rw-r--r--ctl-lib/ctl-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c
index 8a0b07f..cfa0963 100644
--- a/ctl-lib/ctl-config.c
+++ b/ctl-lib/ctl-config.c
@@ -205,7 +205,7 @@ json_object* CtlUpdateSectionConfig(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, c
json_object_object_add(ctlHandle->configJ, key, sectionArrayJ);
if (json_object_get_type(filesJ) == json_type_array) {
- int length = json_object_array_length(filesJ);
+ int length = (int)json_object_array_length(filesJ);
for (int idx=0; idx < length; idx++) {
json_object *oneFileJ = json_object_array_get_idx(filesJ, idx);
json_object *responseJ = ScanForConfig(CONTROL_CONFIG_PATH ,CTL_SCAN_RECURSIVE, json_object_get_string(oneFileJ), ".json");
@@ -248,7 +248,7 @@ json_object* LoadAdditionalsFiles(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, con
{
json_object *filesJ, *filesArrayJ = json_object_new_array();
if (json_object_get_type(sectionJ) == json_type_array) {
- int length = json_object_array_length(sectionJ);
+ int length = (int)json_object_array_length(sectionJ);
for (int idx=0; idx < length; idx++) {
json_object *obj = json_object_array_get_idx(sectionJ, idx);
int hasFiles = json_object_object_get_ex(obj, "files", &filesJ);