From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: [PATCH 05/10] net/vmxnet3: fix compile error with gcc 7 Date: Thu, 4 May 2017 16:38:17 +0100 Message-ID: <20170504153822.19461-6-bruce.richardson@intel.com> References: <20170504153822.19461-1-bruce.richardson@intel.com> Cc: Bruce Richardson To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 540567CD5 for ; Thu, 4 May 2017 17:38:35 +0200 (CEST) In-Reply-To: <20170504153822.19461-1-bruce.richardson@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" GCC 7 flags a value as uninitialized before used. While it's a false positive, there is little harm in providing an initial value for the variable. Fixes: bb1d14b87fc3 ("vmxnet3: fix link state handling") Signed-off-by: Bruce Richardson --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 0e8eb75..1cd72c1 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -935,7 +935,7 @@ vmxnet3_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete) { struct vmxnet3_hw *hw = dev->data->dev_private; - struct rte_eth_link old, link; + struct rte_eth_link old = {0}, link; uint32_t ret; /* Link status doesn't change for stopped dev */ -- 2.9.3