]> andersk Git - libyaml.git/blobdiff - tests/example-reformatter-alt.c
Fix -Wformat compilation errors in tests
[libyaml.git] / tests / example-reformatter-alt.c
index 550e06cb787bce51f327a36f4190fe4c07ff82d6..e7d006e4a64a73eafb779a887d67834d2b74645e 100644 (file)
@@ -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);
             }
This page took 0.094209 seconds and 4 git commands to generate.