summaryrefslogtreecommitdiff
path: root/tests/run-emitter.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-emitter.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-emitter.c')
-rw-r--r--tests/run-emitter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/run-emitter.c b/tests/run-emitter.c
index fee2922..4996a85 100644
--- a/tests/run-emitter.c
+++ b/tests/run-emitter.c
@@ -205,8 +205,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;
}
@@ -319,7 +319,7 @@ main(int argc, char *argv[])
yaml_event_delete(events+k);
}
- printf("PASSED (length: %zd)\n", written);
+ printf("PASSED (length: %ld)\n", (long)written);
print_output(argv[number], buffer, written, -1);
}