From c6d8b70a3006f50b77a5b9896236641565681a51 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 30 Sep 2014 10:40:08 +0100 Subject: [PATCH] ixgbe: fix build with clang Clang fails with an error about a variable being used uninitialized: lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30: error: variable 'dma_addr0' is uninitialized when used here [-Werror,-Wuninitialized] dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); ^~~~~~~~~ This error can be fixed by replacing the call to xor which takes two parameters, by a call to setzero, which does not take any. Reported-by: Keith Wiles Signed-off-by: Bruce Richardson Acked-by: Thomas Monjalon --- lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c index 457f267dce..2236250638 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c @@ -64,7 +64,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq) RTE_IXGBE_RXQ_REARM_THRESH) < 0) { if (rxq->rxrearm_nb + RTE_IXGBE_RXQ_REARM_THRESH >= rxq->nb_rx_desc) { - dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); + dma_addr0 = _mm_setzero_si128(); for (i = 0; i < RTE_IXGBE_DESCS_PER_LOOP; i++) { rxep[i].mbuf = &rxq->fake_mbuf; _mm_store_si128((__m128i *)&rxdp[i].read, -- 2.20.1