summaryrefslogtreecommitdiff
path: root/examples/show-index.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-06-27 15:27:29 +0200
committerPatrick Steinhardt <ps@pks.im>2019-07-05 11:28:57 +0200
commit2dea47362e007b9cbfbc218ad125202a248ed470 (patch)
treee79dd433fbf5920cd23ef2a99e6bb5748e77b1a9 /examples/show-index.c
parentabf24a30fd4a78373f62ecafa36bd9d1d89489d0 (diff)
downloadlibgit2-2dea47362e007b9cbfbc218ad125202a248ed470.tar.gz
examples: avoid warning when iterating over index entries
When iterating over index entries, we store the indices in an unsigned int. As the index entrycount is a `size_t` though, this may be a loss of precision which a compiler might rightfully complain about. Use `size_t` instead to fix any warnings.
Diffstat (limited to 'examples/show-index.c')
-rw-r--r--examples/show-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/show-index.c b/examples/show-index.c
index 6acadbeb6..34eb41c7b 100644
--- a/examples/show-index.c
+++ b/examples/show-index.c
@@ -17,7 +17,7 @@
int lg2_show_index(git_repository *repo, int argc, char** argv)
{
git_index *index;
- unsigned int i, ecount;
+ size_t i, ecount;
char *dir = ".";
size_t dirlen;
char out[GIT_OID_HEXSZ+1];