alistair23-linux/tools/perf/util/include/linux
Irina Tirdea 1d037ca164 perf tools: Use __maybe_used for unused variables
perf defines both __used and __unused variables to use for marking
unused variables. The variable __used is defined to
__attribute__((__unused__)), which contradicts the kernel definition to
__attribute__((__used__)) for new gcc versions. On Android, __used is
also defined in system headers and this leads to warnings like: warning:
'__used__' attribute ignored

__unused is not defined in the kernel and is not a standard definition.
If __unused is included everywhere instead of __used, this leads to
conflicts with glibc headers, since glibc has a variables with this name
in its headers.

The best approach is to use __maybe_unused, the definition used in the
kernel for __attribute__((unused)). In this way there is only one
definition in perf sources (instead of 2 definitions that point to the
same thing: __used and __unused) and it works on both Linux and Android.
This patch simply replaces all instances of __used and __unused with
__maybe_unused.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
[ committer note: fixed up conflict with a116e05 in builtin-sched.c ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-09-11 12:19:15 -03:00
..
bitmap.h perf tools: Add bitmap_or function into bitmap object 2012-02-13 23:28:10 -02:00
bitops.h perf tools: include __WORDSIZE definition 2012-09-11 11:47:45 -03:00
compiler.h perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
const.h perf tools: Fix build on older systems 2011-05-26 11:16:29 -03:00
ctype.h perf tools: Bring linear set of section headers for features 2009-11-11 07:30:19 +01:00
export.h perf tools: Switch module.h into export.h 2012-03-26 17:19:57 +02:00
hash.h perf: Add util/include/linuxhash.h to include hash.h of kernel 2010-01-31 08:27:53 +01:00
kernel.h perf tools: fix ALIGN redefinition in system headers 2012-09-11 11:48:30 -03:00
linkage.h perf bench: Add feature that measures the performance of the arch/x86/lib/memcpy_64.S memcpy routines via 'perf bench mem' 2010-11-26 08:15:57 +01:00
list.h Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-23 09:25:52 -07:00
magic.h perf tools: include wrapper for magic.h 2012-09-11 11:38:10 -03:00
poison.h perf_counter tools: Share list.h with the kernel 2009-07-01 22:37:23 +02:00
prefetch.h perf_counter tools: Share list.h with the kernel 2009-07-01 22:37:23 +02:00
rbtree.h perf tools: Fix build for another rbtree.c change 2012-09-07 22:21:59 -03:00
string.h perf tools: Add memdup function 2012-09-11 12:04:41 -03:00
types.h perf tools: Update types definitions for Android 2012-09-11 11:46:09 -03:00