summaryrefslogtreecommitdiff
path: root/tests/example-deconstructor-alt.c
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-12-07 19:55:20 -0600
committerIngy döt Net <ingy@ingy.net>2016-12-17 13:27:18 -0800
commit44d49c9019930352dea29b539fd949f1c22a5766 (patch)
tree9a7d1514c66d0950d2acc609e4dbe8d2950b6c83 /tests/example-deconstructor-alt.c
parentfd039be5f1f13cd9278d510ddf8f3ccda0e0d1ec (diff)
downloadlibyaml-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-deconstructor-alt.c')
-rw-r--r--tests/example-deconstructor-alt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/example-deconstructor-alt.c b/tests/example-deconstructor-alt.c
index 7da194a..c5412cc 100644
--- a/tests/example-deconstructor-alt.c
+++ b/tests/example-deconstructor-alt.c
@@ -703,25 +703,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 %zd\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);
}
@@ -729,14 +729,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);
}