diff options
author | Junio C Hamano <gitster@pobox.com> | 2025-01-16 16:35:14 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-01-16 16:35:14 -0800 |
commit | 564b907c8a39ac6e6f8aecc6b2a1c125d41ada66 (patch) | |
tree | a491394905500adf1c0b34fae881a8fb08033628 /commit.c | |
parent | 66e01e510a7cca4235489eac128913b069fa58a4 (diff) | |
parent | 24027256aa9614a445563707a72af7ce5ff49b5b (diff) |
Merge branch 'ps/more-sign-compare'
More -Wsign-compare fixes.
* ps/more-sign-compare:
sign-compare: avoid comparing ptrdiff with an int/unsigned
commit-reach: use `size_t` to track indices when computing merge bases
shallow: fix -Wsign-compare warnings
builtin/log: fix remaining -Wsign-compare warnings
builtin/log: use `size_t` to track indices
commit-reach: use `size_t` to track indices in `get_reachable_subset()`
commit-reach: use `size_t` to track indices in `remove_redundant()`
commit-reach: fix type of `min_commit_date`
commit-reach: fix index used to loop through unsigned integer
prio-queue: fix type of `insertion_ctr`
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -778,11 +778,11 @@ static void clear_commit_marks_1(struct commit_list **plist, } } -void clear_commit_marks_many(int nr, struct commit **commit, unsigned int mark) +void clear_commit_marks_many(size_t nr, struct commit **commit, unsigned int mark) { struct commit_list *list = NULL; - while (nr--) { + for (size_t i = 0; i < nr; i++) { clear_commit_marks_1(&list, *commit, mark); commit++; } |