summaryrefslogtreecommitdiff
path: root/examples/index-pack.c
diff options
context:
space:
mode:
authorScott Furry <scott.wl.furry@gmail.com>2019-06-27 10:02:40 -0600
committerScott Furry <scott.wl.furry@gmail.com>2019-08-01 12:52:12 -0600
commit73a186f28afdfc800db630df3fe895ba1acdc451 (patch)
tree7c28656ef450837c3026a23f04e80b11e50cbc25 /examples/index-pack.c
parent8f7fd981a6d61cc7622afb08c3d01ba3b4e2b487 (diff)
downloadlibgit2-73a186f28afdfc800db630df3fe895ba1acdc451.tar.gz
Adjust printf specifiers in examples code
Static analysis of example code found multiple findings of `printf` usage where filling value is members of git_indexer_progress object. Specifier used was for signed int but git_indexer_progress members are typed as unsigned ints. `printf` specifiers were altered to match type.
Diffstat (limited to 'examples/index-pack.c')
-rw-r--r--examples/index-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/index-pack.c b/examples/index-pack.c
index 2181f43f3..c58ac038a 100644
--- a/examples/index-pack.c
+++ b/examples/index-pack.c
@@ -7,7 +7,7 @@
static int index_cb(const git_indexer_progress *stats, void *data)
{
(void)data;
- printf("\rProcessing %d of %d", stats->indexed_objects, stats->total_objects);
+ printf("\rProcessing %u of %u", stats->indexed_objects, stats->total_objects);
return 0;
}
@@ -59,7 +59,7 @@ int lg2_index_pack(git_repository *repo, int argc, char **argv)
if ((error = git_indexer_commit(idx, &stats)) < 0)
goto cleanup;
- printf("\rIndexing %d of %d\n", stats.indexed_objects, stats.total_objects);
+ printf("\rIndexing %u of %u\n", stats.indexed_objects, stats.total_objects);
git_oid_fmt(hash, git_indexer_hash(idx));
puts(hash);