commit-reach: use size_t to track indices in get_reachable_subset()

Similar as with the preceding commit, adapt `get_reachable_subset()` so
that it tracks array indices via `size_t` instead of using signed
integers to fix a couple of -Wsign-compare warnings. Adapt callers
accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-12-27 11:46:25 +01:00
committed by Junio C Hamano
parent 45843d8f4e
commit 85ee0680e2
7 changed files with 17 additions and 16 deletions

View File

@@ -3041,7 +3041,7 @@ static void reach_filter(struct ref_array *array,
struct commit_list **check_reachable,
int include_reached)
{
int i, old_nr;
size_t i, old_nr;
struct commit **to_clear;
if (!*check_reachable)