From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by dpdk.org (Postfix) with ESMTP id 25A53C3DC for ; Wed, 22 Jun 2016 11:06:35 +0200 (CEST) Received: by mail-lb0-f177.google.com with SMTP id oe3so18521470lbb.1 for ; Wed, 22 Jun 2016 02:06:35 -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; bh=smDvbUq7s6MRLgbeSq0Gjw1N6usO5oW8V0z90PqqMYY=; b=NphZiXb82KI3MKdr62NDrHnNZt3t73f0PniuApgIHzwUvZXdjFW4fyHZ9yGHtdzTlO UoqzweOb9eZd0/Luzx8SDNuz9k31FjH0ezHN7v4+TjvFBbx0Nz1y28X/vFssyt8TT8cS q/QrTsfHIwJV5+Cp/AfNsA7lIXGqY0Xv3fkDw+4dpQko+o+e32ny+IvXR/T9WCXUUcyi 9frknEE/rbWCYyTTYkZP07osxWu76SPS4zr0i6eqeU1jVMB7bDbPSCPxKStDhFe4ScTR SiU9qISoLYm5vYEafWgjLr1o2TCRZHT/Ex7ja+co3VkTbgUFy2X3kjMYrjSVvDaFWRTo bD0A== 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; bh=smDvbUq7s6MRLgbeSq0Gjw1N6usO5oW8V0z90PqqMYY=; b=l2/7efLPriOuYydiTImPKW3vpW1ScJqww8cImuh6zlBsdTp3wf/TJwQTKIIU1Z65+W lYXFiMX+tzliaeaDohg1qGKsiRYrPil0mWqV3eYo/eGVO0z/u1Rog8WNp8mXn3pzzbBq +aZS0UN1bJ8a+FTujWlKVOS3szVEAeu7S8WfnG7sjb0shzIm+TM7ivyD+y85x/vPleXV gPzMtCiHigTHByWTR/FY7tJtJnrDqZvh0dUGPY1Bm4FZfHaXXZSANij8IXtFTe6U4mRl er4+IZgPayPqVD9ISx4gSiakzDRV94s3F4rkCBUNyXnWQlDuprxBRIpA1DvCdVLQ3jAy gT7g== X-Gm-Message-State: ALyK8tIDFLLCF0gGJcRkm6eSU4X5MGF4Xo6zH0H90qgxbvCINGhIWDWa3Qc2TZydqaRwuDN2 X-Received: by 10.195.11.131 with SMTP id ei3mr15896372wjd.102.1466586394784; Wed, 22 Jun 2016 02:06:34 -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 z5sm7019178wme.5.2016.06.22.02.06.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Jun 2016 02:06:34 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Ferruh Yigit , Adrien Mazarguil Date: Wed, 22 Jun 2016 11:05:52 +0200 Message-Id: <1466586355-30777-23-git-send-email-nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1466586355-30777-1-git-send-email-nelio.laranjeiro@6wind.com> References: <1466493818-1877-1-git-send-email-nelio.laranjeiro@6wind.com> <1466586355-30777-1-git-send-email-nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PATCH v4 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: Wed, 22 Jun 2016 09:06:35 -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