All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Krawczyk" <mk@semihalf.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Marcin Wojtas <mw@semihalf.com>, Guy Tzalik <gtzalik@amazon.com>,
	 Evgeny Schemeilin <evgenys@amazon.com>,
	Igor Chauskin <igorch@amazon.com>,
	dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [PATCH 3/3] net/ena: fix build for O1 optimization
Date: Fri, 8 May 2020 15:59:01 +0200	[thread overview]
Message-ID: <CAJMMOfNC9DHj50x_uqFYLk5usGnRHnGM8v1MbGcvU-c484cgBg@mail.gmail.com> (raw)
In-Reply-To: <20200507120259.2197813-3-ferruh.yigit@intel.com>

czw., 7 maj 2020 o 14:03 Ferruh Yigit <ferruh.yigit@intel.com> napisał(a):
>
> Can be reproduced with "make EXTRA_CFLAGS='-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 ‘eth_ena_dev_init’:
> .../drivers/net/ena/ena_ethdev.c:1815:20:
>     error: ‘wd_state’ may be used uninitialized in this function
>            [-Werror=maybe-uninitialized]
>  1815 |  adapter->wd_state = wd_state;
>       |  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
>
> This looks like false positive, fixing by assigning initial value to
> 'wd_state' variable.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
> ---
>  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 = false;
>
>         eth_dev->dev_ops = &ena_dev_ops;
>         eth_dev->rx_pkt_burst = &eth_ena_recv_pkts;
> --
> 2.25.4
>

  reply	other threads:[~2020-05-08 13:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 12:02 [dpdk-dev] [PATCH 1/3] ring: fix build for gcc O1 optimization Ferruh Yigit
2020-05-07 12:02 ` [dpdk-dev] [PATCH 2/3] mempool/octeontx2: " Ferruh Yigit
2020-05-07 14:05   ` Ananyev, Konstantin
2020-05-08 16:20     ` Ferruh Yigit
2020-05-08 16:39       ` Ferruh Yigit
2020-05-07 12:02 ` [dpdk-dev] [PATCH 3/3] net/ena: fix build for " Ferruh Yigit
2020-05-08 13:59   ` Michał Krawczyk [this message]
2020-05-07 13:47 ` [dpdk-dev] [PATCH 1/3] ring: fix build for gcc " Ananyev, Konstantin
2020-05-08 16:45 ` [dpdk-dev] [PATCH v2 1/4] " Ferruh Yigit
2020-05-08 16:45   ` [dpdk-dev] [PATCH v2 2/4] mempool/octeontx2: " Ferruh Yigit
2020-05-10 11:51     ` Jerin Jacob
2020-05-08 16:45   ` [dpdk-dev] [PATCH v2 3/4] net/ena: fix build for " Ferruh Yigit
2020-05-08 16:45   ` [dpdk-dev] [PATCH v2 4/4] event/octeontx2: " Ferruh Yigit
2020-05-08 17:22     ` Ananyev, Konstantin
2020-05-10 11:53       ` Jerin Jacob
2020-05-11 16:07 ` [dpdk-dev] [PATCH v3 1/4] ring: fix build for gcc " Ferruh Yigit
2020-05-11 16:07   ` [dpdk-dev] [PATCH v3 2/4] mempool/octeontx2: " Ferruh Yigit
2020-05-11 16:07   ` [dpdk-dev] [PATCH v3 3/4] net/ena: fix build for " Ferruh Yigit
2020-05-11 16:07   ` [dpdk-dev] [PATCH v3 4/4] event/octeontx2: " Ferruh Yigit
2020-05-11 19:13   ` [dpdk-dev] [PATCH v3 1/4] ring: fix build for gcc " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJMMOfNC9DHj50x_uqFYLk5usGnRHnGM8v1MbGcvU-c484cgBg@mail.gmail.com \
    --to=mk@semihalf.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=ferruh.yigit@intel.com \
    --cc=gtzalik@amazon.com \
    --cc=igorch@amazon.com \
    --cc=mw@semihalf.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.