From mboxrd@z Thu Jan 1 00:00:00 1970 From: min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Subject: [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 Date: Mon, 16 Jun 2014 09:45:41 +0800 Message-ID: <1402883141-32012-2-git-send-email-min.cao@intel.com> References: <1402883141-32012-1-git-send-email-min.cao@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1402883141-32012-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Discription: This patch is aimed to fix the the pointer 'ctx1' uninitialized error with gcc4.5.1 as described below: "dpdk/lib/librte_kvargs/rte_kvargs.c:51:14: error: 'ctx1' may be used uninitialized in this function" Signed-off-by: Zhan Zhaochen Acked-by: Liu, Jijiang Tested-by: Waterman Cao --- lib/librte_kvargs/rte_kvargs.c | 4 +++- 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 -- 1.7.3.1