From e77339f4003c492062c04fd168d7dd732b48a16b Mon Sep 17 00:00:00 2001 From: Dennis Marinus Date: Mon, 1 Dec 2014 16:39:06 -0800 Subject: [PATCH] table: fix maybe-uninitialized variable with gcc lto 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 59f87bb787..cf9261941c 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.20.1