mirror of
https://github.com/json-c/json-c.git
synced 2026-03-26 16:39:06 +08:00
Enable -Werror and fix a number of minor warnings that existed.
This commit is contained in:
@@ -32,7 +32,7 @@ int parse_flags(int argc, char **argv)
|
||||
for (arg_idx = 1; arg_idx < argc ; arg_idx++)
|
||||
{
|
||||
int jj;
|
||||
for (jj = 0; jj < NELEM(format_args); jj++)
|
||||
for (jj = 0; jj < (int)NELEM(format_args); jj++)
|
||||
{
|
||||
if (strcasecmp(argv[arg_idx], format_args[jj].arg) == 0)
|
||||
{
|
||||
|
||||
@@ -183,7 +183,7 @@ struct incremental_step {
|
||||
{ "[1,2,3,]", -1, -1, json_tokener_success, 0 },
|
||||
{ "[1,2,,3,]", -1, 5, json_tokener_error_parse_unexpected, 0 },
|
||||
|
||||
{ NULL, json_tokener_success },
|
||||
{ NULL, -1, -1, json_tokener_success, 0 },
|
||||
};
|
||||
|
||||
static void test_incremental_parse()
|
||||
|
||||
@@ -86,7 +86,7 @@ static void test_printbuf_memappend(int *before_resize)
|
||||
|
||||
char with_nulls[] = { 'a', 'b', '\0', 'c' };
|
||||
printbuf_reset(pb);
|
||||
printbuf_memappend_fast(pb, with_nulls, sizeof(with_nulls));
|
||||
printbuf_memappend_fast(pb, with_nulls, (int)sizeof(with_nulls));
|
||||
printf("With embedded \\0 character: %d, [%s]\n", printbuf_length(pb), pb->buf);
|
||||
|
||||
printbuf_free(pb);
|
||||
|
||||
Reference in New Issue
Block a user