From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 2DB07ADB1 for ; Mon, 20 Jun 2016 18:11:43 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id f126so75818651wma.1 for ; Mon, 20 Jun 2016 09:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=smDvbUq7s6MRLgbeSq0Gjw1N6usO5oW8V0z90PqqMYY=; b=k1AdNsnH/YmzpFX3fJ9Yz3C+72vJdDwPuQsXOofhrySftZ+B0jdihh6zgXEKXWGrck OyRM+YiN1S/6uGE/EVKi84YRt9h3a/MAPjFY3X6FB+T4Tp54dxBw7AIbS54vbZFPqH1E 9X6VrCJaSLT1yZchx/QVkoDXxg7B9RYg8vJO5woiRFrrqXfBrDqke5++UTy5Ans59vti pRd29j2DKF30lFVVB7YS2b1lopFnaH6ErcxZvdRJVOSm4b56omrkR46gcwA0RUdrcW5O Cf6AquaK1lnMc+rzks87m+ErG+xDEuTsdrBeZO7GBlQ5V2WMav3PRsFcyyWgCKrg4Yxh gsYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=smDvbUq7s6MRLgbeSq0Gjw1N6usO5oW8V0z90PqqMYY=; b=W63OwThuVvxFdDZBAvmfp+xSLQ2B88yXx6FTcrRDEAuSUGFfkeYFrxDqK1PihYrihY DST2vi3xCy6RCJ44scH5SgLyL9q5D8YGQbBQxVbKRrb0ynlGKtvqVKLmtizyQ2WPKMW1 7abDxzRGeOiBKM4oWnlyFciTUf6zLkB8xvOzCBJGOJHr4K4v1oSvUm7+lnZp96T37kin ewFLpYK48wcAMDV0zkcX15W20gh3gMjAHSvy5i70N3ozMSTaZIruefcChpgGXYVzpXD6 qpanlT2ue8qx9YppRtuMoC9RofL2hxRAwmcLevIpmHaShBPV3iOYjauzDboy2nZ4E3JG SHSQ== X-Gm-Message-State: ALyK8tJ5DTIsdcKyslpYKibq3o5S642qX7XGUAl8arzkf/s8fpkaIRZLqi5+b6qGmR7DfDA4 X-Received: by 10.195.10.131 with SMTP id ea3mr14662413wjd.86.1466439102981; Mon, 20 Jun 2016 09:11:42 -0700 (PDT) Received: from ping.vm.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id f189sm4543977wmf.19.2016.06.20.09.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 09:11:42 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Ferruh Yigit , Adrien Mazarguil Date: Mon, 20 Jun 2016 18:10:34 +0200 Message-Id: <1466439037-14095-23-git-send-email-nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1466439037-14095-1-git-send-email-nelio.laranjeiro@6wind.com> References: <1465379291-25310-1-git-send-email-nelio.laranjeiro@6wind.com> <1466439037-14095-1-git-send-email-nelio.laranjeiro@6wind.com> In-Reply-To: <1465379291-25310-1-git-send-email-nelio.laranjeiro@6wind.com> References: <1465379291-25310-1-git-send-email-nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PATCH v2 22/25] mlx5: work around spurious compilation errors 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: Mon, 20 Jun 2016 16:11:43 -0000 From: Adrien Mazarguil Since commit "mlx5: resurrect Tx gather support", older GCC versions (such as 4.8.5) may complain about the following: mlx5_rxtx.c: In function `mlx5_tx_burst': mlx5_rxtx.c:705:25: error: `wqe' may be used uninitialized in this function [-Werror=maybe-uninitialized] mlx5_rxtx.c: In function `mlx5_tx_burst_inline': mlx5_rxtx.c:864:25: error: `wqe' may be used uninitialized in this function [-Werror=maybe-uninitialized] In both cases, this code cannot be reached when wqe is not initialized. Considering older GCC versions are still widely used, work around this issue by initializing wqe preemptively, even if it should not be necessary. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index db784c0..2fc57dc 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -591,7 +591,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) unsigned int j = 0; unsigned int max; unsigned int comp; - volatile union mlx5_wqe *wqe; + volatile union mlx5_wqe *wqe = NULL; if (unlikely(!pkts_n)) return 0; @@ -733,7 +733,7 @@ mlx5_tx_burst_inline(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) unsigned int j = 0; unsigned int max; unsigned int comp; - volatile union mlx5_wqe *wqe; + volatile union mlx5_wqe *wqe = NULL; unsigned int max_inline = txq->max_inline; if (unlikely(!pkts_n)) -- 2.1.4