From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by dpdk.org (Postfix) with ESMTP id E46FF4BFE for ; Wed, 20 Mar 2013 17:07:59 +0100 (CET) Received: by mail-ee0-f47.google.com with SMTP id e52so1126655eek.6 for ; Wed, 20 Mar 2013 09:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=elbRvGra9hmW0J7BlAgd+Iws3OK8DZc03v8v01YfpXk=; b=bVPVZGSmA2wEYGVTb8NJMFKVC9a0vRw6bVcDBNMsUhLOO9Duoajcb/dPTVEUybk94I 7IAE5GTuwforephDBMUVhLfBNktWrtxsAw67eH+GMHFUNRcRlpxaVfIcyVcJ0xrt4yjq uT1g6R28gIyO0MJNIJfaJNINJ5nWsHmx7WE6B2szLH6MfuAiBTtqdCiKVrSVOBa1GDNw CBtzK+FfzR9oxIHHwB6RkuYf21f714P9xry0alFpBL4cELU4CjKr1IufOFp0BRJlwYHF t9SrBa/d5eoEsIsr9AoBf4qcnmlWydidZTWb/5TtQ+NPvGVDItYKbt+PCFRnvWsxUaFS oO2g== X-Received: by 10.14.223.69 with SMTP id u45mr72884014eep.23.1363795618724; Wed, 20 Mar 2013 09:06:58 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPS id r4sm3454575eeo.12.2013.03.20.09.06.56 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 Mar 2013 09:06:57 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Wed, 20 Mar 2013 17:06:46 +0100 From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 20 Mar 2013 17:05:01 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkL/LqiDQugVMrKH2ySzMcxB+tat6YcyPVBpeRZSpRUL+IlOI3aFHsJM3zRb4690uk7+cHL Subject: [dpdk-dev] [PATCH 13/22] lib: fix uninitialized variables X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Mar 2013 16:08:00 -0000 From: Zijie Pan Fix compilation errors caused by uninitialized variables. Acked-by: Ivan Boule Acked-by: Adrien Mazarguil Signed-off-by: Krzysztof Witek Signed-off-by: Zijie Pan --- lib/librte_pmd_igb/e1000_rxtx.c | 4 ++-- lib/librte_pmd_igb/igb/e1000_vf.c | 3 ++- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/librte_pmd_igb/e1000_rxtx.c b/lib/librte_pmd_igb/e1000_rxtx.c index 96b0682..ef2b88b 100644 --- a/lib/librte_pmd_igb/e1000_rxtx.c +++ b/lib/librte_pmd_igb/e1000_rxtx.c @@ -330,8 +330,8 @@ eth_igb_xmit_pkts(struct igb_tx_queue *txq, struct rte_mbuf **tx_pkts, uint16_t tx_last; uint16_t nb_tx; uint16_t tx_ol_req; - uint32_t new_ctx; - uint32_t ctx; + uint32_t new_ctx = 0; + uint32_t ctx = 0; uint32_t vlan_macip_lens; sw_ring = txq->sw_ring; diff --git a/lib/librte_pmd_igb/igb/e1000_vf.c b/lib/librte_pmd_igb/igb/e1000_vf.c index 8b81e4b..5d71210 100644 --- a/lib/librte_pmd_igb/igb/e1000_vf.c +++ b/lib/librte_pmd_igb/igb/e1000_vf.c @@ -405,12 +405,13 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count); + msgbuf[0] = E1000_VF_SET_MULTICAST; + if (mc_addr_count > 30) { msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW; mc_addr_count = 30; } - msgbuf[0] = E1000_VF_SET_MULTICAST; msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT; for (i = 0; i < mc_addr_count; i++) { diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index aa698a3..47922c9 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -399,7 +399,7 @@ ixgbe_xmit_pkts(struct igb_tx_queue *txq, struct rte_mbuf **tx_pkts, uint16_t nb_used; uint16_t tx_ol_req; uint32_t vlan_macip_lens; - uint32_t ctx; + uint32_t ctx = 0; uint32_t new_ctx; sw_ring = txq->sw_ring; -- 1.7.2.5