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 3E3B1ADE7 for ; Wed, 8 Jun 2016 11:48:39 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id n184so173200567wmn.1 for ; Wed, 08 Jun 2016 02:48:39 -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=b/dDURXoc0+HhyhVdkP2mrKNxNjKMkDaXSLXm8VlCw4=; b=oNr3f8WSpgHTSGxBKtlSGY6I7YRMx/8MUnM9P+ky/dcwXVS+fZufmo4zLW2/E33Cze XRL8cP9QL+PxEsEkrGsm3EqMUh3uB5jp8wcVveyNGsU0wpZ1JYALzmVkN3c4rxr1J5cd +QfMeHo0f3cEGIW/989UW5N8WsyePFXN5vMVHpov4nQk1ibkhFqRjpXqi0+9NqPlX9R0 +pDHVvSKSGilzZsnXJD196ARe6/70U16k8PGCGV9/25iJY4A/HDNTmwwR2y2RMbTD0Q7 s7dWg/wYkkmjk7CavWIScYG+7WQxy6gfKO5ZI1o2JzyeprGwM8S82bHQ4weugLGXzXYJ 5bnQ== 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=b/dDURXoc0+HhyhVdkP2mrKNxNjKMkDaXSLXm8VlCw4=; b=Vr151rkkHMnYNOYSKnC0FBhokm9Yc2AS3SZfAw3/m+J9FHfcHvgIUHdlsyXyyPxW4K ab0VXQeaTO0NLgK2kXddjoVb+037DEWq4usOQK9Ed+SRmZ+Nc58yJwoGADzTfpMYSMlk 27h0hRZqzHWNAXyNPYKbERcyixZz2xlg1huaOTlrIgWYmH2Aur+uU29ZevYv8gLT75Qs xWIRIJfEoj4h+C87yJtbLhJ7E0ueXmFX9waFx4H8jZ4sW7QYY2TVCxJxSCbTDVj7cU2O Dc4XD5aqqfGzMOoIfezIauEf8H48HgP8t+6ve6NWKYsp7awnQjkDyfORcxklpIZckOw9 ibSg== X-Gm-Message-State: ALyK8tLU3F/QSnm25wka2atsL4oTh94Z/H+XJlJ1/AqxXilxdO7/0Obs+oPcP6Y9dWAGi5gi X-Received: by 10.28.39.198 with SMTP id n189mr6642115wmn.31.1465379318972; Wed, 08 Jun 2016 02:48:38 -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 c185sm23899214wme.9.2016.06.08.02.48.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Jun 2016 02:48:38 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Adrien Mazarguil Date: Wed, 8 Jun 2016 11:48:08 +0200 Message-Id: <1465379291-25310-22-git-send-email-nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 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 21/24] 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, 08 Jun 2016 09:48:39 -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 53d2a57..f4af769 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