From: Bruce Richardson Date: Tue, 30 Sep 2014 09:40:08 +0000 (+0100) Subject: ixgbe: fix build with clang X-Git-Tag: spdx-start~10373 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c6d8b70a3006f50b77a5b9896236641565681a51;p=dpdk.git 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 --- 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,