Skip to content

Commit

Permalink
perf: Fix hist_entry__tui_annotate() build failure
Browse files Browse the repository at this point in the history
When compiling perf on latest tip/master I see the following
error:

  cc1: warnings being treated as errors
  util/newt.c: In function 'hist_entry__tui_annotate':
  util/newt.c:764: warning: 'ret' is used uninitialized in
  this function make: *** [util/newt.o] Error 1

I think the problem was introduced by commit
13f499f

Below is a patch that fixes the problem.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20100629173226.GC23231@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Srikar Dronamraju authored and Ingo Molnar committed Jun 29, 2010
1 parent 567a9fd commit 0879b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ int hist_entry__tui_annotate(struct hist_entry *self)

browser.width += 18; /* Percentage */
ui_browser__show(&browser, self->ms.sym->name);
ui_browser__run(&browser, &es);
ret = ui_browser__run(&browser, &es);
newtFormDestroy(browser.form);
newtPopWindow();
list_for_each_entry_safe(pos, n, &head, node) {
Expand Down

0 comments on commit 0879b10

Please sign in to comment.