diff options
author | Matthew Plough <matt.plough@gmail.com> | 2015-06-30 19:00:41 -0400 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2015-07-12 19:55:19 +0200 |
commit | 768f8be31c3fac1b0ed8f4d49cf7176a30586443 (patch) | |
tree | 93bce70b7e1e0417bd6f843e3ae2eea4d28da0ec /tests/clar_libgit2.c | |
parent | 9126ccac969a8da85992f5e3a67b292e59d4d7d0 (diff) | |
download | libgit2-768f8be31c3fac1b0ed8f4d49cf7176a30586443.tar.gz |
Fix #3094 - improve use of portable size_t/ssize_t format specifiers.
The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
Diffstat (limited to 'tests/clar_libgit2.c')
-rw-r--r-- | tests/clar_libgit2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/clar_libgit2.c b/tests/clar_libgit2.c index dabc47a09..b14af44a9 100644 --- a/tests/clar_libgit2.c +++ b/tests/clar_libgit2.c @@ -483,8 +483,8 @@ void clar__assert_equal_file( for (pos = 0; pos < bytes && expected_data[pos] == buf[pos]; ++pos) /* find differing byte offset */; p_snprintf( - buf, sizeof(buf), "file content mismatch at byte %d", - (int)(total_bytes + pos)); + buf, sizeof(buf), "file content mismatch at byte %"PRIdZ, + (ssize_t)(total_bytes + pos)); p_close(fd); clar__fail(file, line, path, buf, 1); } |