From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 47D792A7 for ; Mon, 16 Jun 2014 03:46:06 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 15 Jun 2014 18:40:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,482,1400050800"; d="scan'208";a="557972398" Received: from shilc102.sh.intel.com ([10.239.39.44]) by orsmga002.jf.intel.com with ESMTP; 15 Jun 2014 18:45:58 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shilc102.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s5G1js4q027312; Mon, 16 Jun 2014 09:45:56 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s5G1jp5l032134; Mon, 16 Jun 2014 09:45:53 +0800 Received: (from mcao7@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s5G1jpZD032130; Mon, 16 Jun 2014 09:45:51 +0800 From: min.cao@intel.com To: dev@dpdk.org Date: Mon, 16 Jun 2014 09:45:41 +0800 Message-Id: <1402883141-32012-2-git-send-email-min.cao@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1402883141-32012-1-git-send-email-min.cao@intel.com> References: <1402883141-32012-1-git-send-email-min.cao@intel.com> Subject: [dpdk-dev] [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 01:46:06 -0000 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