Warnings - use size_t where appropriate to prevent warning when compilation is targeting 64 bit
This commit is contained in:
parent
bc743ad2d9
commit
9b435df3d4
@ -224,8 +224,9 @@ static int do_dump(const json_t *json, size_t flags, int depth,
|
||||
|
||||
case JSON_ARRAY:
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
size_t n;
|
||||
size_t i;
|
||||
|
||||
json_array_t *array;
|
||||
|
||||
/* detect circular references */
|
||||
|
@ -56,7 +56,7 @@ void jsonp_error_vset(json_error_t *error, int line, int column,
|
||||
|
||||
error->line = line;
|
||||
error->column = column;
|
||||
error->position = position;
|
||||
error->position = (int)position;
|
||||
|
||||
vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);
|
||||
error->text[JSON_ERROR_TEXT_LENGTH - 1] = '\0';
|
||||
|
@ -169,7 +169,7 @@ static int stream_get(stream_t *stream, json_error_t *error)
|
||||
if(0x80 <= c && c <= 0xFF)
|
||||
{
|
||||
/* multi-byte UTF-8 sequence */
|
||||
int i, count;
|
||||
size_t i, count;
|
||||
|
||||
count = utf8_check_first(c);
|
||||
if(!count)
|
||||
@ -900,7 +900,7 @@ static json_t *parse_json(lex_t *lex, size_t flags, json_error_t *error)
|
||||
|
||||
if(error) {
|
||||
/* Save the position even though there was no error */
|
||||
error->position = lex->stream.position;
|
||||
error->position = (int)lex->stream.position;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user