diff options
| author | Arnav Bhate <bhatearnav@gmail.com> | 2025-03-30 23:15:06 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-01 02:51:47 -0700 |
| commit | 6d29175c0f321f64a90385a2a3dab63ba8c76358 (patch) | |
| tree | d5ae528285061dd724520c68b75624b11dc32c45 /t/unit-tests | |
| parent | 683c54c999c301c2cd6f715c411407c413b1d84e (diff) | |
pathspec: fix sign comparison warnings
There are multiple places, especially in loops, where a signed and an
unsigned data type are compared. Git uses a mix of signed and unsigned
types to store lengths of arrays. This sometimes leads to using a signed
index for an array whose length is stored in an unsigned variable or
vice versa. In some cases, where both signed and unsigned data types
have been used to store lengths of arrays in the same function, only
one variable was used to iterate over both types.
Replace signed data types with unsigned data types and vice versa
wherever necessary. Where both types of iterators are required, move
the declaration inside the for loop. In cases where this is not
possible, add appropriate cast.
Remove #define DISABLE_SIGN_COMPARE_WARNINGS.
Signed-off-by: Arnav Bhate <bhatearnav@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests')
0 files changed, 0 insertions, 0 deletions
