perf tool: Fix gcc 4.6.0 issues
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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
1ff511e35e
commit
fb7d0b3cef
@@ -248,8 +248,7 @@ static void python_process_event(int cpu, void *data,
|
||||
context = PyCObject_FromVoidPtr(scripting_context, NULL);
|
||||
|
||||
PyTuple_SetItem(t, n++, PyString_FromString(handler_name));
|
||||
PyTuple_SetItem(t, n++,
|
||||
PyCObject_FromVoidPtr(scripting_context, NULL));
|
||||
PyTuple_SetItem(t, n++, context);
|
||||
|
||||
if (handler) {
|
||||
PyTuple_SetItem(t, n++, PyInt_FromLong(cpu));
|
||||
|
Reference in New Issue
Block a user