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 26BC4A0556; Thu, 20 Feb 2020 10:38:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 895FF1BFA5; Thu, 20 Feb 2020 10:38:13 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 40BBC1B951 for ; Thu, 20 Feb 2020 10:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582191491; 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=ZYjuAewjv+rtdEpPTXheIpHB+XZph0Hd9Wec4T99IWA=; b=a7kAyodp+Oreb3J/fBY8mIJvUZOgNB81vISndYx+w+2bgYtIE/ObKn/P4XSkQcBI3rufL0 8KcDqwOSVtNMS6Xd65FOg4GMiBEsvX5cwareA76p28jq+hiZaB3IocG419aBe24aLSlOx/ CWXWmNiob5RPq3CDUjB64soDUbUkb6Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-JgUoXvE3OEimCrMGCjg5SA-1; Thu, 20 Feb 2020 04:38:08 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C3D2F10CE784; Thu, 20 Feb 2020 09:38:06 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DEC160BE1; Thu, 20 Feb 2020 09:38:00 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , stable@dpdk.org, konstantin.ananyev@intel.com, Radu Nicolau , Akhil Goyal Date: Thu, 20 Feb 2020 09:37:44 +0000 Message-Id: <20200220093744.13925-2-ktraynor@redhat.com> In-Reply-To: <20200220093744.13925-1-ktraynor@redhat.com> References: <20200220093744.13925-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: JgUoXvE3OEimCrMGCjg5SA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH 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" gcc 10.0.1 reports: ../examples/ipsec-secgw/ipsec_process.c: In function =E2=80=98ipsec_process= =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 function [= -Werror=3Dmaybe-uninitialized] 132 | grp[n].cnt =3D pkts + i - grp[n].m; | ~~~~~~^~ Fix by initializing the array. Fixes: 3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec lib= rary") Cc: stable@dpdk.org Signed-off-by: Kevin Traynor --- note, commit log violates line length but I didn't want to split warning ms= g. Cc: konstantin.ananyev@intel.com Cc: Radu Nicolau Cc: Akhil Goyal --- examples/ipsec-secgw/ipsec_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ip= sec_process.c index bb2f2b82d..0032c5c08 100644 --- a/examples/ipsec-secgw/ipsec_process.c +++ b/examples/ipsec-secgw/ipsec_process.c @@ -287,5 +287,5 @@ ipsec_process(struct ipsec_ctx *ctx, struct ipsec_traff= ic *trf) =09struct rte_ipsec_group *pg; =09struct rte_ipsec_session *ips; -=09struct rte_ipsec_group grp[RTE_DIM(trf->ipsec.pkts)]; +=09struct rte_ipsec_group grp[RTE_DIM(trf->ipsec.pkts)] =3D {}; =20 =09n =3D sa_group(trf->ipsec.saptr, trf->ipsec.pkts, grp, trf->ipsec.num); --=20 2.21.1