summaryrefslogtreecommitdiff
path: root/tests/run-dumper.c
diff options
context:
space:
mode:
authorReini Urban <rurban@cpanel.net>2016-02-27 11:45:51 +0100
committerIngy döt Net <ingy@ingy.net>2018-01-08 10:44:25 -0800
commitfc2dd942fc61ae135b7e2bfe5c248b1f15b74547 (patch)
tree73d890dce146a918cb53c768c7c8117066712476 /tests/run-dumper.c
parent2b8b563222293e2cc410cd7fd9cb31f05622d97e (diff)
downloadlibyaml-git-fc2dd942fc61ae135b7e2bfe5c248b1f15b74547.tar.gz
Fixed most compiler warnings -Wall -Wextra
repro: CFLAGS="-Wall -Wextra -Wunused-parameter -Wc++-compat" ./configure && make which we use for perl, and libyaml is now included in cperl. Tested with gcc-5 and clang-3.7 There are still a tons of format warnings (%d on 64bit) in example-deconstructor.c which I skipped.
Diffstat (limited to 'tests/run-dumper.c')
-rw-r--r--tests/run-dumper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/run-dumper.c b/tests/run-dumper.c
index 6236ee1..302b9b9 100644
--- a/tests/run-dumper.c
+++ b/tests/run-dumper.c
@@ -180,8 +180,8 @@ int print_output(char *name, unsigned char *buffer, size_t size, int count)
if (feof(file)) break;
}
fclose(file);
- printf("#### (length: %zd)\n", total_size);
- printf("OUTPUT:\n%s#### (length: %zd)\n", buffer, size);
+ printf("#### (length: %ld)\n", (long)total_size);
+ printf("OUTPUT:\n%s#### (length: %ld)\n", buffer, (long)size);
return 0;
}
@@ -304,7 +304,7 @@ main(int argc, char *argv[])
yaml_document_delete(documents+k);
}
- printf("PASSED (length: %zd)\n", written);
+ printf("PASSED (length: %ld)\n", (long)written);
print_output(argv[number], buffer, written, -1);
}