Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Plough <matt.plough@gmail.com>2015-07-01 02:00:41 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-07-12 20:55:19 +0300
commit768f8be31c3fac1b0ed8f4d49cf7176a30586443 (patch)
tree93bce70b7e1e0417bd6f843e3ae2eea4d28da0ec /examples
parent9126ccac969a8da85992f5e3a67b292e59d4d7d0 (diff)
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 'examples')
-rw-r--r--examples/network/fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/fetch.c b/examples/network/fetch.c
index 67444cb4a..6be12406b 100644
--- a/examples/network/fetch.c
+++ b/examples/network/fetch.c
@@ -143,10 +143,10 @@ int fetch(git_repository *repo, int argc, char **argv)
* network.
*/
if (stats->local_objects > 0) {
- printf("\rReceived %d/%d objects in %zu bytes (used %d local objects)\n",
+ printf("\rReceived %d/%d objects in %" PRIuZ " bytes (used %d local objects)\n",
stats->indexed_objects, stats->total_objects, stats->received_bytes, stats->local_objects);
} else{
- printf("\rReceived %d/%d objects in %zu bytes\n",
+ printf("\rReceived %d/%d objects in %" PRIuZ "bytes\n",
stats->indexed_objects, stats->total_objects, stats->received_bytes);
}