summaryrefslogtreecommitdiff
path: root/lib/librte_kvargs
diff options
context:
space:
mode:
authorMin Cao <min.cao@intel.com>2014-06-16 11:22:11 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-06-17 19:01:59 +0200
commit1122f06c42a6b1e43a965f3d2a3e793a0eba4f4d (patch)
tree05bf9bc81ddf88781ae2a9492406a914d280e9c7 /lib/librte_kvargs
parent00685b0fe2a34ae15cd1e305ec2c3ae075ed2ea8 (diff)
downloaddpdk-1122f06c42a6b1e43a965f3d2a3e793a0eba4f4d.zip
dpdk-1122f06c42a6b1e43a965f3d2a3e793a0eba4f4d.tar.gz
dpdk-1122f06c42a6b1e43a965f3d2a3e793a0eba4f4d.tar.xz
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 <min.cao@intel.com> Acked-by: Jijiang Liu <jijiang.liu@intel.com> Tested-by: Waterman Cao <waterman.cao@intel.com>
Diffstat (limited to 'lib/librte_kvargs')
-rw-r--r--lib/librte_kvargs/rte_kvargs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c
index a7586a3..8bc1e46 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