aboutsummaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-11 20:53:27 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:52:51 +0200
commitdded1b16dc18bb5b692b58d0e2e303bde7ca0308 (patch)
treec474d77826f915d62ddf1ba9de2d95a5cce6198f /4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
parent2f4d9d83892d6cc32ea329a3d1ae2f003e912b3c (diff)
Correct some compilation warnings
Correct some compilation warnings that appeared in some gcc versions. Change-Id: I846c573f3128f7d5d5da8b7d2eb1b63dc61af1ab Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
index 9eb8ef6..62c1e27 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
@@ -225,7 +225,7 @@ int HalCtlsCreateAllApi(AFB_ApiT apiHandle, struct HalMgrData *HalMgrGlobalData)
}
// We load 1st file others are just warnings
- for(index = 0; index < json_object_array_length(configJ); index++) {
+ for(index = 0; index < (int) json_object_array_length(configJ); index++) {
entryJ = json_object_array_get_idx(configJ, index);
if(wrap_json_unpack(entryJ, "{s:s, s:s !}", "fullpath", &fullPath, "filename", &fileName)) {
@@ -234,8 +234,8 @@ int HalCtlsCreateAllApi(AFB_ApiT apiHandle, struct HalMgrData *HalMgrGlobalData)
}
strncpy(filePath, fullPath, sizeof(filePath) - 1);
- strncat(filePath, "/", sizeof(filePath));
- strncat(filePath, fileName, sizeof(filePath));
+ strncat(filePath, "/", sizeof(filePath) - 1);
+ strncat(filePath, fileName, sizeof(filePath) - 1);
if(HalCtlsCreateApi(apiHandle, filePath, HalMgrGlobalData) < 0)
status--;