From: Ingo Molnar Date: Fri, 3 Jul 2009 11:17:28 +0000 (+0200) Subject: perf report: Annotate variable initialization X-Git-Tag: v2.6.31-rc4~3^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=029e5b1636d0511ef143af3a20c83c48e44c03f3;p=platform%2Fupstream%2Fkernel-adaptation-pc.git perf report: Annotate variable initialization 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 Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 283773d..fa937f5 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -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) {