patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: David Marchand <david.marchand@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: Thu, 25 Aug 2022 10:55:45 +0100	[thread overview]
Message-ID: <288e485c-d875-9dab-60b7-66766b4da39f@redhat.com> (raw)
In-Reply-To: <CAJFAV8y3i1MwatUWc+6APpgFAAORGw4YZ3EO2uWBu2j5mK3e7A@mail.gmail.com>

On 24/08/2022 14:55, David Marchand wrote:
> 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.
> 
> 

ok, thanks. I'll just keep the current workaround as neither are 
particularly pretty and the example was dropped soon after 21.11, so I 
don't think anyone cares too much about it.


      reply	other threads:[~2022-08-25  9:55 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
2022-08-25  9:55   ` Kevin Traynor [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=288e485c-d875-9dab-60b7-66766b4da39f@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=bluca@debian.org \
    --cc=david.marchand@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).