Fix a few warnings with jansson

This commit is contained in:
jp9000 2014-04-14 13:46:07 -07:00
parent fa490fa8c4
commit fdd5b2b3b6
3 changed files with 4 additions and 4 deletions

View file

@ -230,7 +230,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
goto array_error;
array->visited = 1;
n = json_array_size(json);
n = (int)json_array_size(json);
if(dump("[", 1, data))
goto array_error;

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

@ -171,7 +171,7 @@ static int stream_get(stream_t *stream, json_error_t *error)
/* multi-byte UTF-8 sequence */
int i, count;
count = utf8_check_first(c);
count = (int)utf8_check_first(c);
if(!count)
goto out;
@ -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;