removed explicit casts

This commit is contained in:
Maximilian Röhrle 2018-10-15 06:58:19 +02:00
parent fc591913ac
commit d115953347
2 changed files with 6 additions and 6 deletions

View File

@ -351,7 +351,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
}
assert(i == size);
qsort((void*)keys, size, sizeof(const char *), compare_keys);
qsort((keys, size, sizeof(const char *), compare_keys);
for(i = 0; i < size; i++)
{
@ -366,7 +366,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
if(dump(separator, separator_length, data) ||
do_dump(value, flags, depth + 1, parents, dump, data))
{
jsonp_free((void*)keys);
jsonp_free(keys);
return -1;
}
@ -375,7 +375,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
if(dump(",", 1, data) ||
dump_indent(flags, depth + 1, 1, dump, data))
{
jsonp_free((void*)keys);
jsonp_free(keys);
return -1;
}
}
@ -383,7 +383,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
{
if(dump_indent(flags, depth, 0, dump, data))
{
jsonp_free((void*)keys);
jsonp_free(keys);
return -1;
}
}

View File

@ -174,7 +174,7 @@ static int stream_get(stream_t *stream, json_error_t *error)
return STREAM_STATE_EOF;
}
stream->buffer[0] = (char) c;
stream->buffer[0] = c;
stream->buffer_pos = 0;
if(0x80 <= c && c <= 0xFF)
@ -189,7 +189,7 @@ static int stream_get(stream_t *stream, json_error_t *error)
assert(count >= 2);
for(i = 1; i < count; i++)
stream->buffer[i] = (char) stream->get(stream->data);
stream->buffer[i] = stream->get(stream->data);
if(!utf8_check_full(stream->buffer, count, NULL))
goto out;