perf tool: Fix gcc 4.6.0 issues
authorKyle McMartin <kyle@mcmartin.ca>
Mon, 24 Jan 2011 16:13:04 +0000 (11:13 -0500)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:34 +0000 (11:42 -0700)
commitade54059e5e13c0a85067ea498e4f33f7d1c470e
tree30eb4edd6fe3c76bdc3c7bfdc5909fc15657479e
parentea12995eae7639821e35c394b813e461e3945e5a
perf tool: Fix gcc 4.6.0 issues

BugLink: http://bugs.launchpad.net/bugs/769042

commit fb7d0b3cefb80a105f7fd26bbc62e0cbf9192822 upstream.

GCC 4.6.0 in Fedora rawhide turned up some compile errors in tools/perf
due to the -Werror=unused-but-set-variable flag.

I've gone through and annotated some of the assignments that had side
effects (ie: return value from a function) with the __used annotation,
and in some cases, just removed unused code.

In a few cases, we were assigning something useful, but not using it in
later parts of the function.

kyle@dreadnought:~/src% gcc --version
gcc (GCC) 4.6.0 20110122 (Red Hat 4.6.0-0.3)

Cc: Ingo Molnar <mingo@redhat.com>
LKML-Reference: <20110124161304.GK27353@bombadil.infradead.org>
Signed-off-by: Kyle McMartin <kyle@redhat.com>
[ committer note: Fixed up the annotation fixes, as that code moved recently ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[Backported to 2.6.38.2 by deleting unused but set variables]
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
tools/perf/bench/sched-pipe.c
tools/perf/builtin-sched.c
tools/perf/builtin-top.c
tools/perf/util/header.c
tools/perf/util/hist.c
tools/perf/util/scripting-engines/trace-event-python.c
tools/perf/util/symbol.c
tools/perf/util/trace-event-parse.c
tools/perf/util/ui/browsers/map.c