[dpdk-dev] [PATCH] lpm: fix maybe-uninitialized warning when using LTO during compilation

Bruce Richardson bruce.richardson at intel.com
Tue Dec 2 10:16:44 CET 2014


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 <dmarinus at amazon.com>

Acked-by: Bruce Richardson <bruce.richardson at intel.com>

> ---
>  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
> 


More information about the dev mailing list