All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Kevin Traynor <ktraynor@redhat.com>
Cc: dev <dev@dpdk.org>, "Wang, Yipeng1" <yipeng1.wang@intel.com>,
	 "Gobriel, Sameh" <sameh.gobriel@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] hash: fix gcc 10 maybe-uninitialized warning
Date: Mon, 18 May 2020 13:48:47 +0200	[thread overview]
Message-ID: <CAJFAV8ybqTuqacc0KZyE=GcxpXB-uWjvPQedcQrMFaMTsmOEtA@mail.gmail.com> (raw)
In-Reply-To: <20200515142808.14064-1-ktraynor@redhat.com>

On Fri, May 15, 2020 at 4:28 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> gcc 10.1.1 reports a warning for the ext_bkt_id variable:
>
> ../lib/librte_hash/rte_cuckoo_hash.c:
> In function ‘__rte_hash_add_key_with_hash’:
> ../lib/librte_hash/rte_cuckoo_hash.c:1104:29:
> warning: ‘ext_bkt_id’ may be used uninitialized in this function
> [-Wmaybe-uninitialized]
>  1104 |  (h->buckets_ext[ext_bkt_id - 1]).sig_current[0] = short_sig;
>       |                  ~~~~~~~~~~~^~~
>
> The return value of rte_ring_sc_dequeue_elem() is already checked,
> but also initialize ext_bkt_id to zero (invalid value) and check
> that it also overwritten.
>
> Fixes: fbfe568103b0 ("hash: use 32-bit elements rings to save memory")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

Acked-by: Yipeng Wang <yipeng1.wang@intel.com>


Applied, thanks.

-- 
David Marchand


      parent reply	other threads:[~2020-05-18 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 14:28 [dpdk-dev] [PATCH] hash: fix gcc 10 maybe-uninitialized warning Kevin Traynor
2020-05-15 19:06 ` Wang, Yipeng1
2020-05-15 19:17   ` Kevin Traynor
2020-05-15 20:04     ` Wang, Yipeng1
2020-05-18 11:48 ` David Marchand [this message]

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='CAJFAV8ybqTuqacc0KZyE=GcxpXB-uWjvPQedcQrMFaMTsmOEtA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=ktraynor@redhat.com \
    --cc=sameh.gobriel@intel.com \
    --cc=stable@dpdk.org \
    --cc=yipeng1.wang@intel.com \
    /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.