From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FE34A0350; Fri, 8 May 2020 15:59:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1000F1DAD9; Fri, 8 May 2020 15:59:14 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 5C9391DAB9 for ; Fri, 8 May 2020 15:59:13 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id 50so1461563wrc.11 for ; Fri, 08 May 2020 06:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=yxNs14/V708Ooo7VN965jl8s92HIpkdvwX4kZikUdxk=; b=VtejzEs591ncyKw+n3qCJCd2j/V6YzejV7w55Q9BpdrPYYxnPUNpKYGUrLEssyF4QL /0uJoIDFqK7shjmLGNXO+9M3Kyl6PVIXQMSIBb2IH1b5ljEXvJEXvxIrP/XI2HIjH9ww 0vXIdfNRzWzckD5tUlcRIWKWrdZCE/w+uYzgh3SsggGckjuw4qagnsFO6wSRJLIRxuA7 LqjctcKznbdcZC/sBEA2E24PZyYox8INcEGoEKgden7m76v9R/Zwtys2tEql3J4XtbPn lkWvvTwHjaRl8l3WpIvjOpLnURl669lmZ9wVn8NDlCvYTTmskO0093YUKDrE+z+xRfBp 1nUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yxNs14/V708Ooo7VN965jl8s92HIpkdvwX4kZikUdxk=; b=Ck4avID3TJ++wbDSCRpUBkHmjHTHDN9wHA5qcSzoAetBoknqGxs1h5kgUedqvAMRsp xk/yFtZSckelb9kXIbO+HCoTd5Lu8WfnZtafizCYniM3jmBRsUMlivKCf/PRncEBfz5o qEd9pkbI2PVlrBJevyY7jSWPLuRlcgImmfJXCZ0/B5jWnyFlVONFkImrsRMIIVHJJ7JL zucUDH8NO3Xh38TIgL0l7NcvbAoxtZR3PQy4NCILUCpnBZqYxG4qfPxkFp3A/gtQPv61 l/wZ55fvamIZMIIQ5h4qKcfj8YlzgJkFRb6fHUYRBuCQrCB/OF0MBkWy8StUpKv/3C5U JflA== X-Gm-Message-State: AGi0PuZoggp5GpAIxz0CSM8kCCAwQgymeZLdEXnvlBb4fk8aZ8rHPGsq Ko84hnE52YWqiYohJEkPq218DDbo+EsfhGB7Nh9xDQ== X-Google-Smtp-Source: APiQypILnqj3Ax45nQ7DnSO0S/0dFkBw7txEZzAnGucIG5lAI1q5b2Bty05b5Tw5K6MEeEnq9ArcPu7TPrGODYpCVCE= X-Received: by 2002:adf:f1c3:: with SMTP id z3mr3328315wro.201.1588946352570; Fri, 08 May 2020 06:59:12 -0700 (PDT) MIME-Version: 1.0 References: <20200507120259.2197813-1-ferruh.yigit@intel.com> <20200507120259.2197813-3-ferruh.yigit@intel.com> In-Reply-To: <20200507120259.2197813-3-ferruh.yigit@intel.com> From: =?UTF-8?Q?Micha=C5=82_Krawczyk?= Date: Fri, 8 May 2020 15:59:01 +0200 Message-ID: To: Ferruh Yigit Cc: Marcin Wojtas , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , dev@dpdk.org, Thomas Monjalon , David Marchand Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 3/3] net/ena: fix build for O1 optimization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" czw., 7 maj 2020 o 14:03 Ferruh Yigit napisa=C5=82= (a): > > Can be reproduced with "make EXTRA_CFLAGS=3D'-O1'" command using > gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) > > Build error: > .../drivers/net/ena/ena_ethdev.c: In function =E2=80=98eth_ena_dev_init= =E2=80=99: > .../drivers/net/ena/ena_ethdev.c:1815:20: > error: =E2=80=98wd_state=E2=80=99 may be used uninitialized in this f= unction > [-Werror=3Dmaybe-uninitialized] > 1815 | adapter->wd_state =3D wd_state; > | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~ > > This looks like false positive, fixing by assigning initial value to > 'wd_state' variable. > > Signed-off-by: Ferruh Yigit Acked-by: Michal Krawczyk > --- > drivers/net/ena/ena_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c > index c3fd3a4ac0..fbddc79f79 100644 > --- a/drivers/net/ena/ena_ethdev.c > +++ b/drivers/net/ena/ena_ethdev.c > @@ -1756,7 +1756,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth= _dev) > int rc; > static int adapters_found; > bool disable_meta_caching; > - bool wd_state; > + bool wd_state =3D false; > > eth_dev->dev_ops =3D &ena_dev_ops; > eth_dev->rx_pkt_burst =3D ð_ena_recv_pkts; > -- > 2.25.4 >