From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v1] net/mlx4: fix missing initializers for old GCC Date: Tue, 24 Oct 2017 16:44:19 +0200 Message-ID: <20171024144419.GC26782@6wind.com> References: <1508848533-180885-1-git-send-email-motih@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Moti Haimovsky Return-path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 9A0F51B820 for ; Tue, 24 Oct 2017 16:44:31 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id b189so16107826wmd.4 for ; Tue, 24 Oct 2017 07:44:31 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1508848533-180885-1-git-send-email-motih@mellanox.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" On Tue, Oct 24, 2017 at 03:35:33PM +0300, Moti Haimovsky wrote: > This patch works around compilation issues seen on RHEL 7.2 > using GCC 4.8.5: > > [...] In function 'mlx4_rss_init': > [...]/mlx4_rxq.c:433:19: error: 'wq_num' may be used uninitialized > in this function [-Werror=maybe-uninitialized] > > Fixes: ff3397e90080 ("net/mlx4: relax Rx queue configuration order") > > Signed-off-by: Moti Haimovsky > --- > drivers/net/mlx4/mlx4_rxq.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c > index fb28290..4c50077 100644 > --- a/drivers/net/mlx4/mlx4_rxq.c > +++ b/drivers/net/mlx4/mlx4_rxq.c > @@ -417,6 +417,8 @@ void mlx4_rss_detach(struct mlx4_rss *rss) > if (wq) { > wq_num = wq->wq_num; > claim_zero(ibv_destroy_wq(wq)); > + } else { > + wq_num = 0; /* Shut up GCC 4.8 warnings. */ Wait, there's an indentation issue here, please remove unnecessary extra space before "wq_num". > } > claim_zero(ibv_destroy_cq(cq)); > if (!wq) { > -- > 1.8.3.1 > -- Adrien Mazarguil 6WIND