[dpdk-dev] [PATCH] i40e: unintended sign extension

2016-06-09 Thread Bruce Richardson
On Fri, May 20, 2016 at 03:03:36PM +0200, Slawomir Mrozowicz wrote: > Suspicious implicit sign extension: pf->fdir.match_counter_index > with type unsigned short (16 bits, unsigned) is promoted in > pf->fdir.match_counter_index << 20 to type int (32 bits, signed), > then sign-extended to type

[dpdk-dev] [PATCH] i40e: unintended sign extension

2016-05-20 Thread Slawomir Mrozowicz
Suspicious implicit sign extension: pf->fdir.match_counter_index with type unsigned short (16 bits, unsigned) is promoted in pf->fdir.match_counter_index << 20 to type int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If pf->fdir.match_counter_index << 20 is