diff --git a/src/json-editor.c b/src/json-editor.c index cd14cb569e2e50dec0c6af5a7cbebb09c13af3f1..4da19518550d4d20c33cc348101c6b2a8c87bb86 100644 --- a/src/json-editor.c +++ b/src/json-editor.c @@ -14,7 +14,8 @@ static char *get_file(const char *path) { FILE *f; - size_t len, nread; + size_t nread; + long int len; char *buffer; f = fopen(path, "r"); @@ -175,7 +176,7 @@ static struct json_object *dummy_val(char *val, enum json_type type) * Should the key not be an array, it will be converted to an array and appropriate indexes will be prepared. * */ -static int iterate_array(struct json_object *src, int *idx, int len, struct json_object *j_val, enum json_type type, char *key) +static int iterate_array(struct json_object *src, int *idx, int len, struct json_object *j_val, char *key) { struct json_object *val; @@ -267,7 +268,7 @@ static int add_val(struct json_object *src, char *key, char *val, enum json_type copy_object_into_object(j_val, src); } else - iterate_array(src, idx, len, j_val, type, parsed_key); + iterate_array(src, idx, len, j_val, parsed_key); goto out; } @@ -276,7 +277,7 @@ static int add_val(struct json_object *src, char *key, char *val, enum json_type if (len < 1 || type == json_type_array) json_object_object_add(src, parsed_key, j_val); else { - iterate_array(src, idx, len, j_val, type, parsed_key); + iterate_array(src, idx, len, j_val, parsed_key); } out: