From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] lpm: fix maybe-uninitialized warning when using LTO during compilation Date: Tue, 2 Dec 2014 09:16:44 +0000 Message-ID: <20141202091644.GA8340@bricha3-MOBL3> References: <1417480746-25902-1-git-send-email-dmarinus@amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org To: Dennis Marinus Return-path: Content-Disposition: inline In-Reply-To: <1417480746-25902-1-git-send-email-dmarinus-vV1OtcyAfmbQT0dZR+AlfA@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" On Mon, Dec 01, 2014 at 04:39:06PM -0800, Dennis Marinus wrote: > This patch fixes a maybe-uninitialized warning when compiling DPDK with > GCC 4.9 + Link Time Optimization. > > Signed-off-by: Dennis Marinus Acked-by: Bruce Richardson > --- > lib/librte_table/rte_table_lpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_table/rte_table_lpm.c b/lib/librte_table/rte_table_lpm.c > index 59f87bb..cf92619 100644 > --- a/lib/librte_table/rte_table_lpm.c > +++ b/lib/librte_table/rte_table_lpm.c > @@ -185,7 +185,7 @@ rte_table_lpm_entry_add( > struct rte_table_lpm_key *ip_prefix = (struct rte_table_lpm_key *) key; > uint32_t nht_pos, nht_pos0_valid; > int status; > - uint8_t nht_pos0; > + uint8_t nht_pos0 = 0; > > /* Check input parameters */ > if (lpm == NULL) { > -- > 2.1.2.AMZN >