[dpdk-dev] [PATCH] app/test: fix overflow in EFD test

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jan 30 17:14:49 CET 2017


2017-01-25 11:29, Pablo de Lara:
> When RTE_EFD_VALUE_NUM_BITS is 32, there was a compilation issue
> because of an overflow:
> 
> app/test/test_efd.c:157:55: error: overflow in expression;
> result is 2147483647 with type 'int' [-Werror,-Winteger-overflow]
>         data[0] = mrand48() & ((1 << RTE_EFD_VALUE_NUM_BITS) - 1);
> 
> This commit fixes the issue by using a setting a different
> macro VALUE_BITMASK with a conditional
> 
> Fixes: 0e925aef2779 ("app/test: add EFD functional and perf tests")
> 
> Reported-by: Yong Liu <yong.liu at intel.com>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>

Applied, thanks


More information about the dev mailing list