mk: fix build with gcc 4.4 and clang
authorThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 14 Apr 2015 09:23:36 +0000 (11:23 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 20 Apr 2015 12:37:22 +0000 (14:37 +0200)
commite74c4e0938b09dad487d7b2b067bf209e32e1398
tree5d6c59f2caddc947e4f300c467e6893aee42f8b3
parent016a07f32fe978cec1d2a466c734be3c2a5c5959
mk: fix build with gcc 4.4 and clang

With GCC 4.4.7 from CentOS 6.5, the following errors arise:

lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_dev_rx_queue_setup':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:2509: error: missing initializer
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:2509: error: (near initialization for 'dev_info.driver_name')

lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_set_rsc':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:4072: error: missing initializer
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:4072: error: (near initialization for 'dev_info.driver_name')

lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_recv_pkts_lro_single_alloc':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:1479: error: 'next_rsc_entry' may be used uninitialized in this function
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:1480: error: 'next_rxe' may be used uninitialized in this function

The "missing initializer" warning is a GCC bug which seems fixed in 4.7.
The same warning is thrown by clang.
The "may be used uninitialized" warning is another GCC bug which seems fixed in 4.7.

Fixes: 8eecb3295aed ("ixgbe: add LRO support")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>
lib/librte_pmd_ixgbe/Makefile
mk/toolchain/clang/rte.vars.mk
mk/toolchain/gcc/rte.vars.mk