diff options
author | CNLohr <lohr85@gmail.com> | 2017-03-17 01:08:06 -0400 |
---|---|---|
committer | CNLohr <lohr85@gmail.com> | 2017-03-17 01:08:06 -0400 |
commit | 8ea24c306fdf2a141433e396307e92a227416ba5 (patch) | |
tree | e5c33347f918547acafd0770cce45bced41ef89e /redist/json_helpers.c | |
parent | c9be7c057aa9570d0f67109c87b74e3aab640322 (diff) | |
download | libsurvive-8ea24c306fdf2a141433e396307e92a227416ba5.tar.gz libsurvive-8ea24c306fdf2a141433e396307e92a227416ba5.tar.bz2 |
Fix Warnings
Diffstat (limited to 'redist/json_helpers.c')
-rw-r--r-- | redist/json_helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/redist/json_helpers.c b/redist/json_helpers.c index e0b86f4..1e2f43e 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -107,7 +107,7 @@ void json_write_str(FILE* f, const char* tag, const char* v) { void (*json_begin_object)(char* tag) = NULL; void (*json_end_object)() = NULL; -void (*json_tag_value)(char* tag, char** values, uint16_t count) = NULL; +void (*json_tag_value)(char* tag, char** values, uint8_t count) = NULL; uint32_t JSON_STRING_LEN; @@ -146,7 +146,7 @@ static uint16_t json_load_array(const char* JSON_STRING, jsmntok_t* tokens, uint values[i] = substr(JSON_STRING, t->start, t->end, JSON_STRING_LEN); } - if (json_tag_value != NULL) json_tag_value(tag, values, i); + if (json_tag_value != NULL) json_tag_value(tag, values, (uint8_t)i); for (i=0;i<size;++i) free(values[i]); @@ -159,7 +159,7 @@ void json_load_file(const char* path) { char* JSON_STRING = load_file_to_mem(path); if (JSON_STRING==NULL) return; - JSON_STRING_LEN = strlen(JSON_STRING); + JSON_STRING_LEN = (uint32_t)strlen(JSON_STRING); jsmn_parser parser; jsmn_init(&parser); |