perf report: Annotate variable initialization
authorIngo Molnar <mingo@elte.hu>
Fri, 3 Jul 2009 11:17:28 +0000 (13:17 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 3 Jul 2009 11:17:28 +0000 (13:17 +0200)
Certain versions of GCC dont see the initialization that is done here:

  builtin-report.c: In function ‘__cmd_report’:
  builtin-report.c:1038: warning: ‘syms’ may be used uninitialized in this function

So annotate it with a NULL initialization.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-report.c

index 283773d91aa048f1ef0e9737f3033a9e9c2dcf82..fa937f5c3c395afb0e44c1553877fe1b8ba5733e 100644 (file)
@@ -1035,7 +1035,7 @@ resolve_callchain(struct thread *thread, struct map *map __used,
                    struct ip_callchain *chain, struct hist_entry *entry)
 {
        u64 context = PERF_CONTEXT_MAX;
-       struct symbol **syms;
+       struct symbol **syms = NULL;
        unsigned int i;
 
        if (callchain) {