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:

committed by
Junio C Hamano

parent
45843d8f4e
commit
85ee0680e2
4
remote.c
4
remote.c
@ -1535,7 +1535,7 @@ static struct ref **tail_ref(struct ref **head)
|
||||
|
||||
struct tips {
|
||||
struct commit **tip;
|
||||
int nr, alloc;
|
||||
size_t nr, alloc;
|
||||
};
|
||||
|
||||
static void add_to_tips(struct tips *tips, const struct object_id *oid)
|
||||
@ -1602,7 +1602,7 @@ static void add_missing_tags(struct ref *src, struct ref **dst, struct ref ***ds
|
||||
const int reachable_flag = 1;
|
||||
struct commit_list *found_commits;
|
||||
struct commit **src_commits;
|
||||
int nr_src_commits = 0, alloc_src_commits = 16;
|
||||
size_t nr_src_commits = 0, alloc_src_commits = 16;
|
||||
ALLOC_ARRAY(src_commits, alloc_src_commits);
|
||||
|
||||
for_each_string_list_item(item, &src_tag) {
|
||||
|
Reference in New Issue
Block a user