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 95A1EA0556; Thu, 20 Feb 2020 10:38:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 90B7D1BF99; Thu, 20 Feb 2020 10:38:04 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 4BB611B951 for ; Thu, 20 Feb 2020 10:38:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582191482; 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; bh=nRiyUoSjb1qTmYvA5JjkI5nub5BvBfntr5IU9iloWf4=; b=CbXVeXansKn+ZatAQUPiL4YSiqG0fIYZrkooXTWcOLzaeXCNYVB8JVeTlyGFEE5993BXbE Kk3BDw1MiKM+p/ofpqoSyPp+4GEBoYK/FSFLvQnyLpqX6Ab32BL4ASAhMxOiIHFUNSNqMn ZQsf//7jvrQBthh+9H37KW/C96SWn0o= 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-379-USCjR9YZPJuHsCrnZSZmbA-1; Thu, 20 Feb 2020 04:38:00 -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 83EC413E2; Thu, 20 Feb 2020 09:37:59 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DCE960BE1; Thu, 20 Feb 2020 09:37:52 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , stable@dpdk.org, allain.legacy@windriver.com, Steven Webster , Matt Peters Date: Thu, 20 Feb 2020 09:37:43 +0000 Message-Id: <20200220093744.13925-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: USCjR9YZPJuHsCrnZSZmbA-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 1/2] net/avp: 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: ../drivers/net/avp/avp_ethdev.c: In function =E2=80=98avp_xmit_scattered_pk= ts=E2=80=99: ../drivers/net/avp/avp_ethdev.c:1791:24: warning: =E2=80=98avp_bufs[count]=E2=80=99 may be used uninitialized in thi= s function [-Wmaybe-uninitialized] 1791 | tx_bufs[i] =3D avp_bufs[count]; | ~~~~~~~~^~~~~~~ ../drivers/net/avp/avp_ethdev.c:1791:24: warning: =E2=80=98avp_bufs[count]=E2=80=99 may be used uninitialized in thi= s function [-Wmaybe-uninitialized] Fix by intializing the array. Fixes: 295abce2d25b ("net/avp: add packet transmit functions") 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: allain.legacy@windriver.com Cc: Steven Webster Cc: Matt Peters --- drivers/net/avp/avp_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index cd747b6be..1abe96ce5 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -1695,5 +1695,5 @@ avp_xmit_scattered_pkts(void *tx_queue, { =09struct rte_avp_desc *avp_bufs[(AVP_MAX_TX_BURST * -=09=09=09=09 RTE_AVP_MAX_MBUF_SEGMENTS)]; +=09=09=09=09 RTE_AVP_MAX_MBUF_SEGMENTS)] =3D {}; =09struct avp_queue *txq =3D (struct avp_queue *)tx_queue; =09struct rte_avp_desc *tx_bufs[AVP_MAX_TX_BURST]; --=20 2.21.1