]> git.ipfire.org Git - thirdparty/git.git/commit
decorate: fix sign comparison warnings
authorArnav Bhate <bhatearnav@gmail.com>
Mon, 10 Mar 2025 18:08:53 +0000 (23:38 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Mar 2025 20:21:13 +0000 (13:21 -0700)
commit2bfd3b368572cbf1ce287de09db08b7e7e429ecd
treea90211cc0886e3fb7e5d915f4eb790edca1ebc49
parent87a0bdbf0f72b7561f3cd50636eee33dcb7dbcc3
decorate: fix sign comparison warnings

There are multiple instances where ints have been initialized with
values of unsigned ints, and where negative values don't mean anything.
When such ints are compared with unsigned ints, it causes sign comparison
warnings.

Also, some of these are used just as stand-ins for their initial
values, never being modified, thus obscuring the specific conditions
under which certain operations happen.

Replace int with unsigned int for 2 variables, and replace the
intermediate variables with their initial values for 2 other variables.

Signed-off-by: Arnav Bhate <bhatearnav@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
decorate.c