From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 7FA182BA2 for ; Thu, 10 Mar 2016 14:43:00 +0100 (CET) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id E7CF064D02; Thu, 10 Mar 2016 13:42:59 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-4-209.ams2.redhat.com [10.36.4.209]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2ADgwSs013039; Thu, 10 Mar 2016 08:42:58 -0500 To: Aaron Conole , dev@dpdk.org References: <1456426121-21423-1-git-send-email-aconole@redhat.com> <1456426121-21423-9-git-send-email-aconole@redhat.com> From: Panu Matilainen Message-ID: <56E179E2.1020704@redhat.com> Date: Thu, 10 Mar 2016 15:42:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1456426121-21423-9-git-send-email-aconole@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 10 Mar 2016 13:43:00 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 8/8] drivers/net/ixgbe: Fix uninitialized warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 13:43:00 -0000 On 02/25/2016 08:48 PM, Aaron Conole wrote: > Silence a compiler warning that this variable may be used uninitialized. > > Signed-off-by: Aaron Conole > --- > drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c > index e95e6b7..775edc7 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -1563,7 +1563,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, > struct ixgbe_rx_entry *rxe; > struct ixgbe_scattered_rx_entry *sc_entry; > struct ixgbe_scattered_rx_entry *next_sc_entry; > - struct ixgbe_rx_entry *next_rxe; > + struct ixgbe_rx_entry *next_rxe = NULL; > struct rte_mbuf *first_seg; > struct rte_mbuf *rxm; > struct rte_mbuf *nmb; > @@ -1740,7 +1740,7 @@ next_desc: > * the pointer to the first mbuf at the NEXTP entry in the > * sw_sc_ring and continue to parse the RX ring. > */ > - if (!eop) { > + if (!eop && next_rxe) { > rxm->next = next_rxe->mbuf; > next_sc_entry->fbuf = first_seg; > goto next_desc; > The patch looks ok as such, but then again warning looks like a false positive to me: assignment and dereferencing depend on the same value of eop, which cannot change between the two. CC'ing the maintainers for attention... - Panu -