aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-05-22 10:18:55 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 14:12:02 +0100
commit19be1beffb857b32c77adf1d993beb61b3c99b82 (patch)
tree346d5fe52b20d812588cf8a006fc3b78f194adab
parentf0bd76620a9325ef92db5d97fd7b477a8d2aa010 (diff)
Fixed compilation warnings with gcc-7.2.0
Replaced some 'size_t' by 'int' Change-Id: I07492dad242b2c8f608f9cc90a4a257e48acec6a Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
-rw-r--r--wrap-json.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wrap-json.c b/wrap-json.c
index 7fc8a9c..fd0ed4a 100644
--- a/wrap-json.c
+++ b/wrap-json.c
@@ -528,7 +528,7 @@ static int vunpack(struct json_object *object, const char *desc, va_list args, i
int64_t *pI = NULL;
size_t *pz = NULL;
uint8_t **py = NULL;
- struct { struct json_object *parent; const char *acc; size_t index; size_t count; char type; } stack[STACKCOUNT], *top;
+ struct { struct json_object *parent; const char *acc; int index; int count; char type; } stack[STACKCOUNT], *top;
struct json_object *obj;
struct json_object **po;
@@ -863,8 +863,8 @@ 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)
{
- size_t n = json_object_array_length(object);
- size_t i = 0;
+ int n = json_object_array_length(object);
+ int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++));
}
@@ -906,8 +906,8 @@ 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 {
- size_t n = json_object_array_length(object);
- size_t i = 0;
+ int n = json_object_array_length(object);
+ int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++), NULL);
}