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 86677A00C5 for ; Thu, 25 Aug 2022 11:55:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60F05410E7; Thu, 25 Aug 2022 11:55:51 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id DBEE840156 for ; Thu, 25 Aug 2022 11:55:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661421349; 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=ED1S2veTLF5HDbuBXqztSLSx8G7QtTlc5hshJeSR6TY=; b=MnZRcjfqJuqT9/GhO3fnZVtZ9xvNdSfuqwjSEv4V4wt0C32D/B3ft9CtSB1O0I+nkFm6WE ymRzcH/FnDs0k316uIvakLsMA3InyfXA76stWU44RzI6aGK2rFWWoUm1Ta2ULVguWGV5Ip d7MkVCVC7QG6aN1uSdF4iKt1UaEIYzM= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-313-ypxQm4Y_OqC_LlWsZP7y_g-1; Thu, 25 Aug 2022 05:55:47 -0400 X-MC-Unique: ypxQm4Y_OqC_LlWsZP7y_g-1 Received: by mail-wm1-f71.google.com with SMTP id c64-20020a1c3543000000b003a61987ffb3so10717254wma.6 for ; Thu, 25 Aug 2022 02:55:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=ED1S2veTLF5HDbuBXqztSLSx8G7QtTlc5hshJeSR6TY=; b=GEFDdHTNL5rom7axdiG+61i8DUXQ4qik91cVveRLr9RYP7FKn2MAoOWEro5rs8XKyQ bSmwKIeMHry5EqOmgSXkQyLjyviYfE5rtaZEL29BFsT2eXLvTEcC8RebGuqqvM4cmQ5X gdWXC+aUTgim4UQTQOb4aDGEu32doA/OQ0DSpGBLOrf6Xg3RCE5m0LmWp8PpuZzzYbMH pQjva5x3Q+hrtssZzYNpiwfYxD1JwLTKW8K0NSCvEsq2OLKkINhcNphvo+IYybGvTmsR gTTQqTVBc0rXmulesWop/iDKIqoios/pJ6G9/FS66KI816tDHZPtPLnCa1LukDrYyo9z dkUA== X-Gm-Message-State: ACgBeo3ySqZO0O7vAv8+4iAb2Vxy1eb324sSxa9KU44zXcPsaOTcPIPL m6xeikYtDwAjI6ZGfYxRuL8zIo2BHu8OdAhVqwBiKYUfhpOYqKT8mx1Ginz2uOu1kcTJzcDcDJx ilzPW1xI= X-Received: by 2002:a05:600c:348d:b0:3a6:b4e:ff6d with SMTP id a13-20020a05600c348d00b003a60b4eff6dmr7363052wmq.95.1661421346824; Thu, 25 Aug 2022 02:55:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ZTxCDtzF3NtP1mqY7LbXgOWjYEYhbbxkxkzsEBuGftBIvFBLEl7R4UoQqjSghAlD/2E2OUA== X-Received: by 2002:a05:600c:348d:b0:3a6:b4e:ff6d with SMTP id a13-20020a05600c348d00b003a60b4eff6dmr7363044wmq.95.1661421346621; Thu, 25 Aug 2022 02:55:46 -0700 (PDT) Received: from [192.168.0.36] ([78.16.251.119]) by smtp.gmail.com with ESMTPSA id y11-20020a5d470b000000b0022584ab85a8sm520743wrq.17.2022.08.25.02.55.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 02:55:46 -0700 (PDT) Message-ID: <288e485c-d875-9dab-60b7-66766b4da39f@redhat.com> Date: Thu, 25 Aug 2022 10:55:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 To: David Marchand Cc: dpdk stable , Luca Boccassi References: <20220824095816.1449620-1-ktraynor@redhat.com> From: Kevin Traynor Subject: Re: [PATCH 21.11] examples/performance-thread: fix build with GCC 12 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 24/08/2022 14:55, David Marchand wrote: > 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 ‘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 > > 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.