Skip to content
Snippets Groups Projects
Commit fe08bb9d authored by Jakob Olsson's avatar Jakob Olsson
Browse files

resolve a few compile warnings

parent 115d4ee5
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
static char *get_file(const char *path) static char *get_file(const char *path)
{ {
FILE *f; FILE *f;
size_t len, nread; size_t nread;
long int len;
char *buffer; char *buffer;
f = fopen(path, "r"); f = fopen(path, "r");
...@@ -175,7 +176,7 @@ static struct json_object *dummy_val(char *val, enum json_type type) ...@@ -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. * 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; struct json_object *val;
...@@ -267,7 +268,7 @@ static int add_val(struct json_object *src, char *key, char *val, enum json_type ...@@ -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); copy_object_into_object(j_val, src);
} else } else
iterate_array(src, idx, len, j_val, type, parsed_key); iterate_array(src, idx, len, j_val, parsed_key);
goto out; goto out;
} }
...@@ -276,7 +277,7 @@ static int add_val(struct json_object *src, char *key, char *val, enum json_type ...@@ -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) if (len < 1 || type == json_type_array)
json_object_object_add(src, parsed_key, j_val); json_object_object_add(src, parsed_key, j_val);
else { else {
iterate_array(src, idx, len, j_val, type, parsed_key); iterate_array(src, idx, len, j_val, parsed_key);
} }
out: out:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment