From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9074DA0543 for ; Wed, 24 Aug 2022 15:56:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 751CC40DDE; Wed, 24 Aug 2022 15:56:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 842094067B for ; Wed, 24 Aug 2022 15:56:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661349369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N0QBf/AdZjr5fVfGpcn1mSFdY3yXUtpIk+qmil14cfU=; b=Y9TaAFC1yksqy/629w1lq8iX32Iudem6+TOKxQypooxeSXFPY59AhOYoZlfaAULdMnYwWq aBAY+fla3v6aeqNZ5B8GttBf+JvC0yPzcsly0knKf4nDrf2MrNH9fyi53DbhinDOWi7oDp 2P4W4P2/6CBrcEtZhrGzLg2kGoYAUHk= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-286-ZL_I3H--PGCiaaYoVFPQmw-1; Wed, 24 Aug 2022 09:56:07 -0400 X-MC-Unique: ZL_I3H--PGCiaaYoVFPQmw-1 Received: by mail-lj1-f200.google.com with SMTP id z7-20020a2ebe07000000b0025e5c7d6a2eso3229398ljq.20 for ; Wed, 24 Aug 2022 06:56:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=N0QBf/AdZjr5fVfGpcn1mSFdY3yXUtpIk+qmil14cfU=; b=YKsuErm1dG+nQ6LCld1Q6qs7cj5NGhJUAPAPh8geHLmlwqfC9AAW0DCtOMYQqJY18s tbCvMqqOKF4CHYPoTsBR+S6Fy6CejQt6RlVAcfBGpE8GTlOrf7QDIyjmrgHWSFCLamfZ wDSmzaQKOpTfPI1Z+RXjuXRB56ziOns3+Z6YkDam/MEii//ve7PBSSoNGCxP1cuvvYRt +P6CpqQOGnpCAQ8zvGondC+6Xvw2JXwBG5FG/Svz6LMbOahdeeY076FYkXRG7MZzWv5r idm4khrVjwVrUPwNWSyjJBuFtlZvINgGAMkt7LTuDpEn/0427G9+ErQbVjAWFC4OC9uU pTmA== X-Gm-Message-State: ACgBeo3zJ/5FeiG/jnOvR2I2JITjjunHsnFvplJA9NIqRd5ucmlY/t+o lj1H5DY1fyI7ECxVzoB+aySsg17E4TYGuW/RjeIwhjrriqOE5UZuPFMmRqCDeauyZ2gfe0DQ6tn t5Rz6mizlLGemfb983asJygA= X-Received: by 2002:a19:5f45:0:b0:492:df3d:d678 with SMTP id a5-20020a195f45000000b00492df3dd678mr6264489lfj.217.1661349366142; Wed, 24 Aug 2022 06:56:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cGwNxJBcSeV9WVFJOwXDYJtv9NMR7oVN4oy+Qh0o+fKOqBudLCKqOLgBqdDHCV82afOUUeDENDydHsQx/U6o= X-Received: by 2002:a19:5f45:0:b0:492:df3d:d678 with SMTP id a5-20020a195f45000000b00492df3dd678mr6264475lfj.217.1661349365845; Wed, 24 Aug 2022 06:56:05 -0700 (PDT) MIME-Version: 1.0 References: <20220824095816.1449620-1-ktraynor@redhat.com> In-Reply-To: <20220824095816.1449620-1-ktraynor@redhat.com> From: David Marchand Date: Wed, 24 Aug 2022 15:55:54 +0200 Message-ID: Subject: Re: [PATCH 21.11] examples/performance-thread: fix build with GCC 12 To: Kevin Traynor Cc: dpdk stable , Luca Boccassi X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Wed, Aug 24, 2022 at 11:58 AM Kevin Traynor 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 =E2=80=98pthread_setspecific=E2=80=99: > ../examples/performance-thread/pthread_shim/pthread_shim.c:592:27: > warning: =E2=80=98data=E2=80=99 may be used uninitialized [-Wmaybe-uninit= ialized] > 592 | int rv =3D 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 > =E2=80=98access (none, 2)=E2=80=99 > 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 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. --=20 David Marchand