aboutsummaryrefslogtreecommitdiff
path: root/redist/json_helpers.c
diff options
context:
space:
mode:
authorMichael Turvey <mwturvey@users.noreply.github.com>2018-01-15 22:43:02 -0700
committerGitHub <noreply@github.com>2018-01-15 22:43:02 -0700
commit7755de9d2af61834568737594e29352b47176c7f (patch)
tree0d9eea391f3b266bcb80c47131092e0dbf317600 /redist/json_helpers.c
parent8be34f04a100defc9d1958aa4ce63ef02d19db69 (diff)
parentb2eb7569a8963917116c4520e15b17f0578a2509 (diff)
downloadlibsurvive-7755de9d2af61834568737594e29352b47176c7f.tar.gz
libsurvive-7755de9d2af61834568737594e29352b47176c7f.tar.bz2
Merge pull request #95 from mwturvey/SmallChange
Resolve warnings & remove survive.h dependency on redist
Diffstat (limited to 'redist/json_helpers.c')
-rw-r--r--redist/json_helpers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/redist/json_helpers.c b/redist/json_helpers.c
index af7ddda..109708a 100644
--- a/redist/json_helpers.c
+++ b/redist/json_helpers.c
@@ -121,7 +121,7 @@ char* load_file_to_mem(const char* path) {
fseek( f, 0, SEEK_SET );
char * JSON_STRING = malloc( len + 1);
memset(JSON_STRING,0,len+1);
- int i = fread( JSON_STRING, len, 1, f ); i = i; //Ignore return value.
+ size_t i = fread( JSON_STRING, len, 1, f ); i = i; //Ignore return value.
fclose( f );
return JSON_STRING;
}
@@ -193,7 +193,7 @@ void json_load_file(const char* path) {
} else if (value_t->type == JSMN_OBJECT) {
printf("Begin Object\n");
if (json_begin_object != NULL) json_begin_object(tag);
- children = value_t->size +1; //+1 to account for this loop where we are not yed parsing children
+ children = (int16_t)(value_t->size +1); //+1 to account for this loop where we are not yed parsing children
// i += decode_jsmn_object(JSON_STRING, tokens+i+2,value_t->size);
}
else {