net/mlx5: fix an uninitialized variable
authorNelio Laranjeiro <nelio.laranjeiro@6wind.com>
Thu, 6 Apr 2017 09:16:32 +0000 (11:16 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 6 Apr 2017 11:08:24 +0000 (13:08 +0200)
commit4e66a6fef321d8015f6bde1aac5018c9ec91721c
treebbbacfc8d729a75583544485a48d23b65b6536e3
parent8b2928c978c5546d3a0c1cac13c7234718ed2359
net/mlx5: fix an uninitialized variable

Since patch "mbuf: structure reorganization" the compiler complains
sometimes (in some conditions):

 .../drivers/net/mlx5/mlx5_rxtx.c: In function ‘mlx5_rx_burst’:
 .../drivers/net/mlx5/mlx5_rxtx.c:2082:17: error: ‘len’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]

len is not initialised as it will be at the first segment of a received
packet, but it remains hard for the compiler to determine it.

Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c