From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id BB806C6A2 for ; Fri, 24 Jun 2016 10:53:58 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id v199so14010478wmv.0 for ; Fri, 24 Jun 2016 01:53:58 -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=ADsvkSchWD9K7hVhrNLAS62RLEF11RWRDrGcaCuqGCc=; b=V5hmRoXX94nrYDH/dafA4EUHD/Q7EpKVlbUbssckRGrD6hF76GcFOlHUHntwd5IE4F pLeozELsPPFpPX54C/28G3CuzO3x/O+psR8hQomN7GY3UdgU7StjXhqeYAENntwvaGQD Ryh4pQyN/wJ5N1SyIqZNQFacJ4od7Ofbr0dMS57oYctKzhKCaRH+zS+GUaL067rVv5mp 9DjkJztI3dL5xC8Is7TznZFxlP2S9cY4Ki4S+hzjvsxCFDrXvTp7cDAp+ZVQbt1Af819 /+GxRZzhSmbxLYPmkyznOet5rF6SiIxFj5IeAX2rE4k4m1+lO2BDrc2ywy8gJoW5X0Fl GrMw== 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=ADsvkSchWD9K7hVhrNLAS62RLEF11RWRDrGcaCuqGCc=; b=IW4Q7voCb3Y9ruc8FACC92BdBvu+E5zGkfRMEHA5C5cKOk6wQ7jGLuBuOBVU0C2rEf Kn0lfJhg2czVopN6QYWWJT8CvxQniVbl8VH2ReGRD6B/Zr4htWwWhd9vBwdF4MRUJYmY w0awqL8QTSCzUpQh1kQnsZoyHa9y5B+2hR1Uo52koB/YgpS26jJG5a/DT+VhRrzvDrET mn2blQXeF89hkUVfPa9QqKcl2Xxr6w1F4jVSWDBxB2tYuqAULVnieercNVV0SBQweWbm /uo89jrNpyQA50HXcbnxx+SdlYpIxL1gkPpFIGYew8zmU8R3NlQwtkBkWBo/eJMTBbVT TJxA== X-Gm-Message-State: ALyK8tKV+e6QIwWD8JWPsMiizrJVVUWKugiELteifyQwPFZwoJf5vVwPJr64UeHu+xgrrAJ5 X-Received: by 10.194.7.70 with SMTP id h6mr2656802wja.38.1466758438510; Fri, 24 Jun 2016 01:53:58 -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 t188sm2060584wma.8.2016.06.24.01.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 01:53:58 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Bruce Richardson , Ferruh Yigit , Adrien Mazarguil Date: Fri, 24 Jun 2016 10:50:58 +0200 Message-Id: <1466758261-25986-23-git-send-email-nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1466758261-25986-1-git-send-email-nelio.laranjeiro@6wind.com> References: <1466700801-10383-1-git-send-email-nelio.laranjeiro@6wind.com> <1466758261-25986-1-git-send-email-nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PATCH v6 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: Fri, 24 Jun 2016 08:53:58 -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 c72e7ce..8b67949 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -593,7 +593,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; @@ -741,7 +741,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