mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
23 KiB
23 KiB