On Thu, Oct 01, 2009 at 09:14:50AM -0700, Smith, Stan wrote: > Upcoming patches do contain a fair amount of casting for those > assignment cases where IB defined fields uint8_t/uint16_t are > assiged from larger sized variable. Will examine code in further > detail favoring var declaration changes for signed/unsigned > comparisions. W.r.t. opensm/* files, the end is in sight. There are > 18 more patch files coming, will reinspect for less casting.
I've always felt the warning on implicit cast from larger to smaller type to be somewhat useless - that is an unavoidable operation when working with networking. Adding casts does nothing to actually improve the code, and trying to change to smaller types results in worse code gen and no improvement in function. Maybe OFW would be better off just turning that warning off? :) > > In general to simplify a detection of such cases we can consider to > > use -Wsign-compare gcc flag in linux environment. And -Wsign-conversion Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
