aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-05-23 20:47:51 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-23 20:47:51 -0400
commita1d44b9acdf7b2820ef762846150b4d13b84e075 (patch)
tree3f32aadffbdb4ecbca78da17f9c05d7fad7db227 /tools
parentab0cce560ef177bdc7a8f73e9962be9d829a7b2c (diff)
perf evlist: Explicititely initialize input_name
It was a global variable, so it was initialized, implicitely, to zero by being placed in the bss. Now it is just a local variable that is then passed to the __cmd_evlist routine, so it must be explicitely set to NULL. The problem manifested on a Fedora 17 system, using: gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) But not on several other systems, by luck. Reported-by: Ingo Molnar <mingo@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-5e8wolcjs3rgd5i6yi995gfh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-evlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c
index e52d77ec7084..acd78dc28341 100644
--- a/tools/perf/builtin-evlist.c
+++ b/tools/perf/builtin-evlist.c
@@ -116,7 +116,7 @@ static const char * const evlist_usage[] = {
116int cmd_evlist(int argc, const char **argv, const char *prefix __used) 116int cmd_evlist(int argc, const char **argv, const char *prefix __used)
117{ 117{
118 struct perf_attr_details details = { .verbose = false, }; 118 struct perf_attr_details details = { .verbose = false, };
119 const char *input_name; 119 const char *input_name = NULL;
120 const struct option options[] = { 120 const struct option options[] = {
121 OPT_STRING('i', "input", &input_name, "file", 121 OPT_STRING('i', "input", &input_name, "file",
122 "Input file name"), 122 "Input file name"),