Enable -Werror and fix a number of minor warnings that existed.

This commit is contained in:
Eric Haszlakiewicz
2013-02-09 16:35:24 -06:00
parent 92d289f5d3
commit ca8b27d183
7 changed files with 18 additions and 16 deletions

View File

@@ -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)
{

View File

@@ -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()

View File

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