From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/2] ixgbe: fix build with gcc 4.4 Date: Thu, 16 Apr 2015 02:18:44 -0700 (PDT) Message-ID: <1581903.SRNWASATZe@xps13> References: <1958525.YbKd0lDtje@xps13> <1429130956-17828-1-git-send-email-thomas.monjalon@6wind.com> <552F7D85.2090002@cloudius-systems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Vlad Zolotarov Return-path: In-Reply-To: <552F7D85.2090002-RmZWMc9puTNJc61us3aD9laTQe2KTcn/@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2015-04-16 12:14, Vlad Zolotarov: > On 04/15/15 23:49, Thomas Monjalon wrote: > > The "may be used uninitialized" warning seems to be another GCC bug and is > > workarounded with NULL initialization. > > --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > > +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > > @@ -1476,8 +1476,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, > > bool eop; > > struct ixgbe_rx_entry *rxe; > > struct ixgbe_rsc_entry *rsc_entry; > > - struct ixgbe_rsc_entry *next_rsc_entry; > > - struct ixgbe_rx_entry *next_rxe; > > + struct ixgbe_rsc_entry *next_rsc_entry = NULL; > > + struct ixgbe_rx_entry *next_rxe = NULL; > > -Wno-maybe-uninitialized ? I prefer avoiding this flag for 2 reasons: - It's not supported in every GCC versions (need special handling) - NULL assigment doesn't hurt