All of lore.kernel.org
 help / color / mirror / Atom feed
From: min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
To: dev-VfR2kkLFssw@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	[thread overview]
Message-ID: <1402883141-32012-2-git-send-email-min.cao@intel.com> (raw)
In-Reply-To: <1402883141-32012-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

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 <zhaochen.zhan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Acked-by: Liu, Jijiang <jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 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

  parent reply	other threads:[~2014-06-16  1:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16  1:45 [dpdk-stv] [PATCH 0/1] Fix the pointer 'ctx1' uninitialized error with gcc4.5.1 min.cao-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1402883141-32012-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-06-16  1:45   ` min.cao-ral2JQCrhuEAvxtiuMwx3w [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-16  3:22 Min Cao
     [not found] ` <1402888931-471-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-06-16  3:22   ` [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 Min Cao
     [not found]     ` <1402888931-471-2-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-06-17 17:04       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402883141-32012-2-git-send-email-min.cao@intel.com \
    --to=min.cao-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.