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:
|
case JSON_ARRAY:
|
||||||
{
|
{
|
||||||
int i;
|
size_t n;
|
||||||
int n;
|
size_t i;
|
||||||
|
|
||||||
json_array_t *array;
|
json_array_t *array;
|
||||||
|
|
||||||
/* detect circular references */
|
/* detect circular references */
|
||||||
|
@ -56,7 +56,7 @@ void jsonp_error_vset(json_error_t *error, int line, int column,
|
|||||||
|
|
||||||
error->line = line;
|
error->line = line;
|
||||||
error->column = column;
|
error->column = column;
|
||||||
error->position = position;
|
error->position = (int)position;
|
||||||
|
|
||||||
vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);
|
vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);
|
||||||
error->text[JSON_ERROR_TEXT_LENGTH - 1] = '\0';
|
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)
|
if(0x80 <= c && c <= 0xFF)
|
||||||
{
|
{
|
||||||
/* multi-byte UTF-8 sequence */
|
/* multi-byte UTF-8 sequence */
|
||||||
int i, count;
|
size_t i, count;
|
||||||
|
|
||||||
count = utf8_check_first(c);
|
count = utf8_check_first(c);
|
||||||
if(!count)
|
if(!count)
|
||||||
@ -265,7 +265,7 @@ static void lex_unget_unsave(lex_t *lex, int c)
|
|||||||
#endif
|
#endif
|
||||||
stream_unget(&lex->stream, c);
|
stream_unget(&lex->stream, c);
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
d =
|
d =
|
||||||
#endif
|
#endif
|
||||||
strbuffer_pop(&lex->saved_text);
|
strbuffer_pop(&lex->saved_text);
|
||||||
assert(c == d);
|
assert(c == d);
|
||||||
@ -900,7 +900,7 @@ static json_t *parse_json(lex_t *lex, size_t flags, json_error_t *error)
|
|||||||
|
|
||||||
if(error) {
|
if(error) {
|
||||||
/* Save the position even though there was no error */
|
/* Save the position even though there was no error */
|
||||||
error->position = lex->stream.position;
|
error->position = (int)lex->stream.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user