* [dpdk-stv] [PATCH 0/1] Fix the pointer 'ctx1' uninitialized error with gcc4.5.1
@ 2014-06-16 3:22 Min Cao
[not found] ` <1402888931-471-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Min Cao @ 2014-06-16 3:22 UTC (permalink / raw)
To: dev-VfR2kkLFssw
Description: This patch is aimed to fix the the pointer 'ctx1' uninitialized error with gcc4.5.1 as described below.
Download dpdk source code from http://dpdk.org, and compile the source code(commit cc333208d5658fea642098b665cd429e6cda54a9).
It has the following compilation error on fedora14 with gcc4.5.1 while it is fine on Fedorak20 with gcc4.8.2:
"dpdk/lib/librte_kvargs/rte_kvargs.c:51:14: error: 'ctx1' may be used uninitialized in this function"
According to the latest DPDK OS Building Test Report(commit:cc333208d5658fea642098b665cd429e6cda54a9, the master branch from http://dpdk.org),
this error also occurs on SUSE11SP2_64 with gcc4.5.1, SUSE11SP3_32 with gcc4.5.1 and SUSE11SP3_64 with gcc4.3.4.
Initializing the pointer can solve this problem.
Signed-off-by: Cao Min <min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Acked-by: Liu, Jijiang <jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Zhan Zhaochen (1):
Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1
lib/librte_kvargs/rte_kvargs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
--
1.7.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <1402888931-471-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 [not found] ` <1402888931-471-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2014-06-16 3:22 ` Min Cao [not found] ` <1402888931-471-2-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Min Cao @ 2014-06-16 3:22 UTC (permalink / raw) To: dev-VfR2kkLFssw 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 <min.cao-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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1402888931-471-2-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 [not found] ` <1402888931-471-2-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2014-06-17 17:04 ` Thomas Monjalon 0 siblings, 0 replies; 4+ messages in thread From: Thomas Monjalon @ 2014-06-17 17:04 UTC (permalink / raw) To: Min Cao; +Cc: dev-VfR2kkLFssw 2014-06-16 11:22, Min Cao: > 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 <min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Acked-by: Liu, Jijiang <jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Applied for version 1.7.0. Thanks -- Thomas ^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stv] [PATCH 0/1] Fix the pointer 'ctx1' uninitialized error with gcc4.5.1
@ 2014-06-16 1:45 min.cao-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1402883141-32012-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: min.cao-ral2JQCrhuEAvxtiuMwx3w @ 2014-06-16 1:45 UTC (permalink / raw)
To: dev-VfR2kkLFssw
Description: This patch is aimed to fix the the pointer 'ctx1' uninitialized error with gcc4.5.1 as described below.
Download dpdk source code from http://dpdk.org, and compile the source code(commit cc333208d5658fea642098b665cd429e6cda54a9).
It has the following compilation error on fedora14 with gcc4.5.1 while it is fine on Fedorak20 with gcc4.8.2:
"dpdk/lib/librte_kvargs/rte_kvargs.c:51:14: error: 'ctx1' may be used uninitialized in this function"
According to the latest DPDK OS Building Test Report(commit:cc333208d5658fea642098b665cd429e6cda54a9, the master branch from http://dpdk.org),
this error also occurs on SUSE11SP2_64 with gcc4.5.1, SUSE11SP3_32 with gcc4.5.1 and SUSE11SP3_64 with gcc4.3.4.
Initializing the pointer can solve this problem.
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>
Zhan Zhaochen (1):
Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1
lib/librte_kvargs/rte_kvargs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
--
1.7.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <1402883141-32012-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 [not found] ` <1402883141-32012-1-git-send-email-min.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2014-06-16 1:45 ` min.cao-ral2JQCrhuEAvxtiuMwx3w 0 siblings, 0 replies; 4+ messages in thread From: min.cao-ral2JQCrhuEAvxtiuMwx3w @ 2014-06-16 1:45 UTC (permalink / raw) To: dev-VfR2kkLFssw 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-17 17:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 3:22 [dpdk-stv] [PATCH 0/1] Fix the pointer 'ctx1' uninitialized error with gcc4.5.1 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
-- strict thread matches above, loose matches on Subject: below --
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 ` [dpdk-stv] [PATCH 1/1] Fix the pointer 'ctx1' uninitialized error with gcc 4.5.1 min.cao-ral2JQCrhuEAvxtiuMwx3w
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox