diff --git a/src/dump.c b/src/dump.c index 5a76630..12c765d 100644 --- a/src/dump.c +++ b/src/dump.c @@ -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; } } diff --git a/src/load.c b/src/load.c index 27d473e..25efe2e 100644 --- a/src/load.c +++ b/src/load.c @@ -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;