diff mbox

[dpdk-dev] bond: Fixed compilation issue on gcc 4.3, due to uninitialized array

Message ID 1417187416-16630-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

De Lara Guarch, Pablo Nov. 28, 2014, 3:10 p.m. UTC
gcc 4.3 complains that slow_pkts array in bond_ethdev_tx_burst_8023ad may be used uninitialized, so it has been initialized to NULL

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_pmd_bond/rte_eth_bond_pmd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Thomas Monjalon Nov. 28, 2014, 3:23 p.m. UTC | #1
2014-11-28 15:10, Pablo de Lara:
> gcc 4.3 complains that slow_pkts array in bond_ethdev_tx_burst_8023ad may be used uninitialized, so it has been initialized to NULL
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied

Thanks
diff mbox

Patch

diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c
index bb2b909..539baa4 100644
--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c
+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c
@@ -585,7 +585,7 @@  bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 
 	/* Allocate additional packets in case 8023AD mode. */
 	struct rte_mbuf *slave_bufs[RTE_MAX_ETHPORTS][buffs_size];
-	void *slow_pkts[BOND_MODE_8023AX_SLAVE_TX_PKTS];
+	void *slow_pkts[BOND_MODE_8023AX_SLAVE_TX_PKTS] = { NULL };
 
 	/* Total amount of packets in slave_bufs */
 	uint16_t slave_nb_pkts[RTE_MAX_ETHPORTS] = { 0 };