Merge pull request #208 from skeid21/master

Fix warnings on LLVM 6.0 targetion iOS arm64.
This commit is contained in:
Petri Lehtinen 2014-11-29 11:52:11 +02:00
commit d5edfcc6fd
3 changed files with 7 additions and 6 deletions

View File

@ -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 */

View File

@ -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';

View File

@ -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;