From: Dennis Marinus Date: Tue, 2 Dec 2014 00:39:06 +0000 (-0800) Subject: table: fix maybe-uninitialized variable with gcc lto X-Git-Tag: spdx-start~10002 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e77339f4003c492062c04fd168d7dd732b48a16b;p=dpdk.git 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 --- 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) {