From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55F57A034F; Wed, 6 May 2020 11:19:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35F221D709; Wed, 6 May 2020 11:19:14 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 9D53D1D705 for ; Wed, 6 May 2020 11:19:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588756753; 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=lqOYpj2YDChVcrX3zRN1lQ/W5lLrWbOx/hNUf2ywlKc=; b=b3m3wAM0nf1hsKKW8vbepX8vHrV7IEkFN70I6es6DuYY1V77R+bb5eO4FVXfAz+50aFOWh 4dIIgD0KC+3BZmTQwdGmGOZFkSdER1N+tAi+NbFRg2CWOcGZjgJDY87MhyRLBeAgPm6hXj IIO2/dlMXj3T9lDPpdfTeHIqYyve75A= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-QEe10futMdeE1cL_-WIMAg-1; Wed, 06 May 2020 05:19:09 -0400 X-MC-Unique: QEe10futMdeE1cL_-WIMAg-1 Received: by mail-ua1-f69.google.com with SMTP id w1so459431uaq.0 for ; Wed, 06 May 2020 02:19:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lqOYpj2YDChVcrX3zRN1lQ/W5lLrWbOx/hNUf2ywlKc=; b=DuTVYxpmDB1HYwnkVQhlBsBf8AzjBM8EqR6Q7z7HYgn9PR8b+wURuBx1QjJm46ftuB UhUrH6mDxD6J29NNWOFlNuutZOlCMhbFcwxHTAWHhPNXLwRdj2tJs3LLk6GDYR8jp538 EZzytkxSPO9AdSALEHuUOZ3q3JrAT/HOekt2UrrrtPv258rxW/h4+Q8uaif8dBATAiqE IGzf3i/puDT4Amwv4u7UXRN1AbhpDY2eC7oGA7LvaHsFWYW0OlVzbAu0fCM0xjHC7MeS aB/rBbA53RyOTlauLc+f9dKJaCb5CzA0ShA+wvIci/mIce9gOpodUUWfq3pH6MbIIVXs y+Dg== X-Gm-Message-State: AGi0PuaUlAwLF6LCuMYJLy9dGlvOEbj6J/IBJDe54d/a3zkYtpvgwwe1 JweMSahZHSEhdIigrisJOO5Q8DniYt/Ns4LBxo7yh8iNsInXCW3pEGHhD/Rdrgcpu3zE/UlsQGP xtMiWh+l3OFwlbWSvNCQ= X-Received: by 2002:a67:ff95:: with SMTP id v21mr6664461vsq.105.1588756749179; Wed, 06 May 2020 02:19:09 -0700 (PDT) X-Google-Smtp-Source: APiQypJqA2Q7tcDbvBvSN6ikXHZLzFwCSCQhPkkdiMNltFprnYS4rF3FjY7d2slmMb6SpgtI8lIi/2BU7Ikfj3OPCPI= X-Received: by 2002:a67:ff95:: with SMTP id v21mr6664449vsq.105.1588756748929; Wed, 06 May 2020 02:19:08 -0700 (PDT) MIME-Version: 1.0 References: <20200220093744.13925-1-ktraynor@redhat.com> <20200311113300.32487-1-ktraynor@redhat.com> <20200311113300.32487-2-ktraynor@redhat.com> In-Reply-To: From: David Marchand Date: Wed, 6 May 2020 11:18:57 +0200 Message-ID: To: Kevin Traynor Cc: "dev@dpdk.org" , "stable@dpdk.org" , "Nicolau, Radu" , "Ananyev, Konstantin" , Akhil Goyal X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 2/2] examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Mar 11, 2020 at 1:05 PM Ananyev, Konstantin wrote: > > From: Kevin Traynor > > Sent: Wednesday, March 11, 2020 11:33 AM > > To: dev@dpdk.org > > Cc: Kevin Traynor ; stable@dpdk.org; Ananyev, Kons= tantin ; Nicolau, Radu > > ; Akhil Goyal > > Subject: [PATCH v2 2/2] examples/ipsec-gw: fix gcc 10 maybe-uninitializ= ed warning > > > > gcc 10.0.1 reports: > > > > ../examples/ipsec-secgw/ipsec_process.c: In function =E2=80=98ipsec_pro= cess=E2=80=99: > > ../examples/ipsec-secgw/ipsec_process.c:132:34: > > error: =E2=80=98grp.m=E2=80=99 may be used uninitialized in this functi= on [-Werror=3Dmaybe-uninitialized] > > 132 | grp[n].cnt =3D pkts + i - grp[n].m; > > | ~~~~~~^~ > > > > This is a correct warning for the initial execution of the statement. > > However, it is the design of the loop that grp[0].cnt will later be > > written with the correct value using an initialized grp[0].m before it > > is used. > > > > In order to remove the warning, initialize grp[0].m for the initial and > > unused calculation of grp[0].cnt. > > > > Fixes: 3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec= library") > > Cc: stable@dpdk.org > > > > Suggested-by: Konstantin Ananyev > > Signed-off-by: Kevin Traynor > Acked-by: Konstantin Ananyev Applied, thanks. --=20 David Marchand