Commit 2dea4736 by Patrick Steinhardt

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.
parent abf24a30
...@@ -624,7 +624,7 @@ static void revwalking(git_repository *repo) ...@@ -624,7 +624,7 @@ static void revwalking(git_repository *repo)
static void index_walking(git_repository *repo) static void index_walking(git_repository *repo)
{ {
git_index *index; git_index *index;
unsigned int i, ecount; size_t i, ecount;
printf("\n*Index Walking*\n"); printf("\n*Index Walking*\n");
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
int lg2_show_index(git_repository *repo, int argc, char** argv) int lg2_show_index(git_repository *repo, int argc, char** argv)
{ {
git_index *index; git_index *index;
unsigned int i, ecount; size_t i, ecount;
char *dir = "."; char *dir = ".";
size_t dirlen; size_t dirlen;
char out[GIT_OID_HEXSZ+1]; char out[GIT_OID_HEXSZ+1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment