summaryrefslogtreecommitdiffstats
path: root/src/wrap-json.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-06-19 18:25:34 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-06-19 18:25:34 +0200
commit2e2bfa31dc97159b7630c3c2913a49147be818d2 (patch)
tree087c09fc5b8cf57e86d619df4eb5bb528e1ffcd4 /src/wrap-json.c
parent7bf0d9c6f807ffae6d9871c606afeccb9b478d3d (diff)
Fix warnings due to json-c evolution
The library json-c now returns size_t instead of int when querying length of arrays. Change-Id: Id52bb8e77da12cb01e61e1a7c7f4ae2fcbe4634e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wrap-json.c')
-rw-r--r--src/wrap-json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wrap-json.c b/src/wrap-json.c
index e757c369..6e604769 100644
--- a/src/wrap-json.c
+++ b/src/wrap-json.c
@@ -948,7 +948,7 @@ static struct json_object *clone_object(struct json_object *object, int subdepth
*/
static struct json_object *clone_array(struct json_object *array, int subdepth)
{
- int n = json_object_array_length(array);
+ int n = (int)json_object_array_length(array);
struct json_object *r = json_object_new_array();
while (n) {
n--;
@@ -1183,8 +1183,8 @@ static int jcmp(struct json_object *x, struct json_object *y, int inc, int sort)
break;
case json_type_array:
- nx = json_object_array_length(x);
- ny = json_object_array_length(y);
+ nx = (int)json_object_array_length(x);
+ ny = (int)json_object_array_length(y);
r = nx - ny;
if (r > 0 && inc)
r = 0;