From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4F5E65961 for ; Mon, 16 Jun 2014 05:22:11 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 15 Jun 2014 20:22:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,483,1400050800"; d="scan'208";a="528997927" Received: from shilc102.sh.intel.com ([10.239.39.44]) by orsmga001.jf.intel.com with ESMTP; 15 Jun 2014 20:22:24 -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 s5G3MIYQ017294; Mon, 16 Jun 2014 11:22:20 +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 s5G3MGlJ000602; Mon, 16 Jun 2014 11:22:18 +0800 Received: (from mcao7@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s5G3MGpY000598; Mon, 16 Jun 2014 11:22:16 +0800 From: Min Cao To: dev@dpdk.org Date: Mon, 16 Jun 2014 11:22:11 +0800 Message-Id: <1402888931-471-2-git-send-email-min.cao@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1402888931-471-1-git-send-email-min.cao@intel.com> References: <1402888931-471-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 03:22:11 -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: Cao Min 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