mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
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.
This commit is contained in:
@@ -624,7 +624,7 @@ static void revwalking(git_repository *repo)
|
||||
static void index_walking(git_repository *repo)
|
||||
{
|
||||
git_index *index;
|
||||
unsigned int i, ecount;
|
||||
size_t i, ecount;
|
||||
|
||||
printf("\n*Index Walking*\n");
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user