On 13/07/14 11:04, Katerina Barone-Adesi wrote:
> It turns out the cast is technically unnecessary, other than
> documenting intent and allowing one to ignore the rest of this
> paragraph. I remembered clause 3 of the integer promotion rules of c99
> backwards. 
> https://www.securecoding.cert.org/confluence/display/seccode/INT02-C.+Understand+integer+conversion+rules
> correctly states "If the operand that has unsigned integer type has
> rank greater than or equal to the rank of the type of the other
> operand, the operand with signed integer type is converted to the type
> of the operand with unsigned integer type."

Might be nice to have this in our wiki since this kind of doubts are common.

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to