[PATCH 1/6] perf newt: Initialize choice variable

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnaldo Carvalho de Melo
Date: Thursday, March 25, 2010 - 3:58 pm

From: Arnaldo Carvalho de Melo <acme@redhat.com>

  cc1: warnings being treated as errors
  util/newt.c: In function ‘perf_session__browse_hists’:
  util/newt.c:442: error: ‘choice’ may be used uninitialized in this function

Note: Ingo, you may want to fold this with:

   [PATCH v2 6/6] perf report: Pass the DSO to 'perf annotate'

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/newt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 12572b5..e99bcc8 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -439,7 +439,7 @@ void perf_session__browse_hists(struct rb_root *hists, u64 session_total,
 	while (1) {
 		char annotate[512];
 		const char *options[2];
-		int nr_options = 0, choice;
+		int nr_options = 0, choice = 0;
 
 		newtFormRun(form, &es);
 		if (es.reason == NEWT_EXIT_HOTKEY) {
-- 
1.6.2.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/6] perf newt: Initialize choice variable, Arnaldo Carvalho de Melo, (Thu Mar 25, 3:58 pm)