Re: [GSoC PATCH v2] decorate: fix sign comparison warnings
Karthik Nayak <karthik.188@gmail.com> writes:
Show 16 quoted lines
> Arnav Bhate <bhatearnav@gmail.com> writes:
>
>> 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.
>
> Nit: worthwhile to mention that we also remove the
> `DISABLE_SIGN_COMPARE_WARNINGS` macro as a result of this change.
I'll keep this in mind for my next contribution.
--
Regards,
Arnav Bhate
(He/Him)