|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/LWIP PATCH] Fix compilation warning about comparison between signed and unsigned integer
Hi, On 11/10/2019 09:55, Jia He wrote:
I am always cautious when I see an explicit cast.If 'idx' is signed then it may mean it can be negative. Both the implicit and explicit cast version will pass the check for negative value. But, IMHO, this is a bad side-effect. Looking at the code, I can't see a good reason for 'idx' to be signed. So why not switch to size_t? I suggested size_t and not unsigned int because you increment it by strlen(..) which return a size_t. Cheers, -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |