aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-05-25 11:00:08 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 14:12:02 +0100
commit1bed1d80d56295b74fdad4fb2b28e4fbfc4c209f (patch)
tree1cd5a52d1d4306faf91ae89678a681830b404e41
parent810841e1b944bb034ddef854e916e4bf4aab3b45 (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>
-rw-r--r--wrap-json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wrap-json.c b/wrap-json.c
index fd0ed4a..eace887 100644
--- a/wrap-json.c
+++ b/wrap-json.c
@@ -702,7 +702,7 @@ static int vunpack(struct json_object *object, const char *desc, va_list args, i
if (!ignore) {
if (!json_object_is_type(obj, json_type_array))
goto missfit;
- top->count = json_object_array_length(obj);
+ top->count = (int)json_object_array_length(obj);
}
xacc[0] = ']';
acc = unpack_accept_arr;
@@ -863,7 +863,7 @@ static void object_for_all(struct json_object *object, void (*callback)(void*,st
static void array_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure)
{
- int n = json_object_array_length(object);
+ int n = (int)json_object_array_length(object);
int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++));
@@ -906,7 +906,7 @@ void wrap_json_for_all(struct json_object *object, void (*callback)(void*,struct
else if (!json_object_is_type(object, json_type_array))
callback(closure, object, NULL);
else {
- int n = json_object_array_length(object);
+ int n = (int)json_object_array_length(object);
int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++), NULL);