diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-12 09:16:49 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-09-19 14:08:47 -0400 |
commit | 0f9654296eabf7f238661d20a6af545986cf713f (patch) | |
tree | de6ab46539265bd535ab50d600eb1dbe2f124107 /tools/perf | |
parent | 0dbb1cac1dbdddf64cdd0f972c062a26484b7177 (diff) |
perf tools: Fix old GCC build error in trace-event-parse.c:parse_proc_kallsyms()
Old GCC (4.1) does not see through the code flow of parse_proc_kallsyms()
and gets confused about the status of 'fmt':
util/trace-event-parse.c: In function ‘parse_proc_kallsyms’:
util/trace-event-parse.c:189: warning: ‘fmt’ may be used uninitialized in this function
make: *** [util/trace-event-parse.o] Error 1
Help out GCC by initializing 'fmt' to NULL.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.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>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130912131649.GC23826@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/trace-event-parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index fe7a27d67d2b..e9e1c03f927d 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c | |||
@@ -186,7 +186,7 @@ void parse_proc_kallsyms(struct pevent *pevent, | |||
186 | char *next = NULL; | 186 | char *next = NULL; |
187 | char *addr_str; | 187 | char *addr_str; |
188 | char *mod; | 188 | char *mod; |
189 | char *fmt; | 189 | char *fmt = NULL; |
190 | 190 | ||
191 | line = strtok_r(file, "\n", &next); | 191 | line = strtok_r(file, "\n", &next); |
192 | while (line) { | 192 | while (line) { |