diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2013-02-09 16:35:24 -0600 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2013-02-09 16:35:24 -0600 |
commit | ca8b27d1836ff97935d2eb212f762f63b9258cbd (patch) | |
tree | 43a44a037bfa29c45738c8310640b6053f225e22 /tests | |
parent | 92d289f5d366058284b69180c3c32ea10ef51610 (diff) |
Enable -Werror and fix a number of minor warnings that existed.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/parse_flags.c | 2 | ||||
-rw-r--r-- | tests/test_parse.c | 2 | ||||
-rw-r--r-- | tests/test_printbuf.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/parse_flags.c b/tests/parse_flags.c index e33ffee..1af61ea 100644 --- a/tests/parse_flags.c +++ b/tests/parse_flags.c @@ -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) { diff --git a/tests/test_parse.c b/tests/test_parse.c index 3e86c5a..481cb12 100644 --- a/tests/test_parse.c +++ b/tests/test_parse.c @@ -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() diff --git a/tests/test_printbuf.c b/tests/test_printbuf.c index fed185e..c8b8ad0 100644 --- a/tests/test_printbuf.c +++ b/tests/test_printbuf.c @@ -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); |