[ofw] RE: [OPENSM] cast to remove warnings about signed vs. unsigned comparisons

Sean Hefty sean.hefty at intel.com
Thu Oct 1 11:43:22 PDT 2009


>The biggest problem is that the cast is only correct if the types
>never change. If someone changes the type then every instance of every
>cast must be tracked down and fixed too. This is a huge maintenance
>burden that implict casting avoids.

You could definitely argue that by changing the type of a variable, you should
validate its usage anywhere it's used.

Trying to assign a variable of one type to another is a valid warning that
should be looked at.  Disabling the warning is not the best solution.

- Sean




More information about the ofw mailing list