From: David Marchand <david.marchand@redhat.com>
To: Kevin Traynor <ktraynor@redhat.com>
Cc: dpdk stable <stable@dpdk.org>, Luca Boccassi <bluca@debian.org>
Subject: Re: [PATCH 21.11] examples/performance-thread: fix build with GCC 12
Date: Wed, 24 Aug 2022 15:55:54 +0200 [thread overview]
Message-ID: <CAJFAV8y3i1MwatUWc+6APpgFAAORGw4YZ3EO2uWBu2j5mK3e7A@mail.gmail.com> (raw)
In-Reply-To: <20220824095816.1449620-1-ktraynor@redhat.com>
On Wed, Aug 24, 2022 at 11:58 AM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> [1/2] Compiling C object examples/dpdk-pthrea...
> formance-thread_pthread_shim_pthread_shim.c.o
> ../examples/performance-thread/pthread_shim/pthread_shim.c:
> In function ‘pthread_setspecific’:
> ../examples/performance-thread/pthread_shim/pthread_shim.c:592:27:
> warning: ‘data’ may be used uninitialized [-Wmaybe-uninitialized]
> 592 | int rv = lthread_setspecific((unsigned int)key, data);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../examples/performance-thread/pthread_shim/pthread_shim.c:589:56:
> note: accessing argument 2 of a function declared with attribute
> ‘access (none, 2)’
> 589 | int pthread_setspecific(pthread_key_t key, const void *data)
> | ~~~~~~~~~~~~^~~~
>
> This is a false positive as pthread_setspecific() does not read from
> the (const void *) so we can squash the warning.
>
> performance-thread example is already removed from DPDK main branch.
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Another workaround would be to redirect calls to pthread_setspecific
to this function "overriden" function.
The same is done for pthread_exit (see pthread_exit_override).
But otherwise this patch seems good enough.
--
David Marchand
next prev parent reply other threads:[~2022-08-24 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 9:58 Kevin Traynor
2022-08-24 13:55 ` David Marchand [this message]
2022-08-25 9:55 ` Kevin Traynor
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=CAJFAV8y3i1MwatUWc+6APpgFAAORGw4YZ3EO2uWBu2j5mK3e7A@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=bluca@debian.org \
--cc=ktraynor@redhat.com \
--cc=stable@dpdk.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).