From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis Marinus Subject: [PATCH] lpm: fix maybe-uninitialized warning when using LTO during compilation Date: Mon, 1 Dec 2014 16:39:06 -0800 Message-ID: <1417480746-25902-1-git-send-email-dmarinus@amazon.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: 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" This patch fixes a maybe-uninitialized warning when compiling DPDK with GCC 4.9 + Link Time Optimization. Signed-off-by: Dennis Marinus --- 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