diff options
author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-12-07 19:55:20 -0600 |
---|---|---|
committer | Ingy döt Net <ingy@ingy.net> | 2016-12-17 13:27:18 -0800 |
commit | 44d49c9019930352dea29b539fd949f1c22a5766 (patch) | |
tree | 9a7d1514c66d0950d2acc609e4dbe8d2950b6c83 /tests/example-reformatter-alt.c | |
parent | fd039be5f1f13cd9278d510ddf8f3ccda0e0d1ec (diff) | |
download | libyaml-git-44d49c9019930352dea29b539fd949f1c22a5766.tar.gz |
Fix -Wformat compilation errors in tests
There were several warnings generated by formatting errors in the tests,
this corrects the format strings and silences the warnings.
Diffstat (limited to 'tests/example-reformatter-alt.c')
-rw-r--r-- | tests/example-reformatter-alt.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/example-reformatter-alt.c b/tests/example-reformatter-alt.c index 550e06c..e7d006e 100644 --- a/tests/example-reformatter-alt.c +++ b/tests/example-reformatter-alt.c @@ -120,25 +120,25 @@ parser_error: case YAML_READER_ERROR: if (parser.problem_value != -1) { - fprintf(stderr, "Reader error: %s: #%X at %d\n", parser.problem, + fprintf(stderr, "Reader error: %s: #%X at %zd\n", parser.problem, parser.problem_value, parser.problem_offset); } else { - fprintf(stderr, "Reader error: %s at %d\n", parser.problem, + fprintf(stderr, "Reader error: %s at %lu\n", parser.problem, parser.problem_offset); } break; case YAML_SCANNER_ERROR: if (parser.context) { - fprintf(stderr, "Scanner error: %s at line %d, column %d\n" - "%s at line %d, column %d\n", parser.context, + fprintf(stderr, "Scanner error: %s at line %lu, column %lu\n" + "%s at line %lu, column %lu\n", parser.context, parser.context_mark.line+1, parser.context_mark.column+1, parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); } else { - fprintf(stderr, "Scanner error: %s at line %d, column %d\n", + fprintf(stderr, "Scanner error: %s at line %lu, column %lu\n", parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); } @@ -146,14 +146,14 @@ parser_error: case YAML_PARSER_ERROR: if (parser.context) { - fprintf(stderr, "Parser error: %s at line %d, column %d\n" - "%s at line %d, column %d\n", parser.context, + fprintf(stderr, "Parser error: %s at line %lu, column %lu\n" + "%s at line %lu, column %lu\n", parser.context, parser.context_mark.line+1, parser.context_mark.column+1, parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); } else { - fprintf(stderr, "Parser error: %s at line %d, column %d\n", + fprintf(stderr, "Parser error: %s at line %lu, column %lu\n", parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); } @@ -161,14 +161,14 @@ parser_error: case YAML_COMPOSER_ERROR: if (parser.context) { - fprintf(stderr, "Composer error: %s at line %d, column %d\n" - "%s at line %d, column %d\n", parser.context, + fprintf(stderr, "Composer error: %s at line %lu, column %lu\n" + "%s at line %lu, column %lu\n", parser.context, parser.context_mark.line+1, parser.context_mark.column+1, parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); } else { - fprintf(stderr, "Composer error: %s at line %d, column %d\n", + fprintf(stderr, "Composer error: %s at line %lu, column %lu\n", parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); } |