From: Min Cao Date: Mon, 16 Jun 2014 03:22:11 +0000 (+0800) Subject: kvargs: fix build with gcc 4.5.1 X-Git-Tag: spdx-start~10667 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1122f06c42a6b1e43a965f3d2a3e793a0eba4f4d;p=dpdk.git kvargs: fix build with gcc 4.5.1 GCC 4.5.1 warns about an uninitialized pointer: error: 'ctx1' may be used uninitialized in this function Signed-off-by: Min Cao Acked-by: Jijiang Liu Tested-by: Waterman Cao --- diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c index a7586a3166..8bc1e46117 100644 --- a/lib/librte_kvargs/rte_kvargs.c +++ b/lib/librte_kvargs/rte_kvargs.c @@ -48,7 +48,9 @@ static int rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params) { unsigned i; - char *str, *ctx1, *ctx2; + char *str; + char *ctx1 = NULL; + char *ctx2 = NULL; /* Copy the const char *params to a modifiable string * to pass to rte_strsplit