Re: [GSoC PATCH v2] decorate: fix sign comparison warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:
> Arnav Bhate <bhatearnav@xxxxxxxxx> 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)





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux