Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062Ab3ISSmx (ORCPT ); Thu, 19 Sep 2013 14:42:53 -0400 Received: from merlin.infradead.org ([205.233.59.134]:43992 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261Ab3ISSks (ORCPT ); Thu, 19 Sep 2013 14:40:48 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Adrian Hunter , David Ahern , Frederic Weisbecker , "H. Peter Anvin" , Jiri Olsa , Mike Galbraith , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Stephane Eranian , Thomas Gleixner , Arnaldo Carvalho de Melo Subject: [PATCH 8/9] perf tools: Fix old GCC build error in trace-event-parse.c:parse_proc_kallsyms() Date: Thu, 19 Sep 2013 15:40:31 -0300 Message-Id: <1379616032-13061-9-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1379616032-13061-1-git-send-email-acme@infradead.org> References: <1379616032-13061-1-git-send-email-acme@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1771 Lines: 50 From: Ingo Molnar 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 Cc: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20130912131649.GC23826@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/trace-event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index fe7a27d..e9e1c03 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, char *next = NULL; char *addr_str; char *mod; - char *fmt; + char *fmt = NULL; line = strtok_r(file, "\n", &next); while (line) { -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/