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 /src/cache.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 'src/cache.c')
-rw-r--r-- | src/cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cache.c b/src/cache.c index 2f3ad1563..ca5173c0d 100644 --- a/src/cache.c +++ b/src/cache.c @@ -50,16 +50,16 @@ void git_cache_dump_stats(git_cache *cache) if (kh_size(cache->map) == 0) return; - printf("Cache %p: %d items cached, %d bytes\n", - cache, kh_size(cache->map), (int)cache->used_memory); + printf("Cache %p: %d items cached, %"PRIdZ" bytes\n", + cache, kh_size(cache->map), cache->used_memory); kh_foreach_value(cache->map, object, { char oid_str[9]; - printf(" %s%c %s (%d)\n", + printf(" %s%c %s (%"PRIuZ")\n", git_object_type2string(object->type), object->flags == GIT_CACHE_STORE_PARSED ? '*' : ' ', git_oid_tostr(oid_str, sizeof(oid_str), &object->oid), - (int)object->size + object->size ); }); } |