linux/tools/perf/ui
Kirill A. Shutemov 4cc49d4dc8 perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific
Perf uses GNU-specific version of strerror_r(). The GNU-specific strerror_r()
returns a pointer to a string containing the error message.  This may be either
a pointer to a string that the function stores in buf, or a pointer to some
(immutable) static string (in which case buf is unused).

In glibc-2.16 GNU version was marked with attribute warn_unused_result.  It
triggers few warnings in perf:

util/target.c: In function ‘perf_target__strerror’:
util/target.c:114:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
ui/browsers/hists.c: In function ‘hist_browser__dump’:
ui/browsers/hists.c:981:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]

They are bugs.

Let's fix strerror_r() usage.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: Ulrich Drepper <drepper@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ulrich Drepper <drepper@gmail.com>
Link: http://lkml.kernel.org/r/20120723210654.GA25248@shutemov.name
[ committer note: s/assert/BUG_ON/g ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-07-25 11:46:04 -03:00
..
browsers perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific 2012-07-25 11:46:04 -03:00
gtk perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
tui perf ui: Introduce struct perf_error_ops 2012-06-19 13:06:18 -03:00
browser.c perf ui browser: Stop using 'self' 2012-05-29 22:42:18 -03:00
browser.h perf annotate browser: Read perf config file for settings 2012-05-29 22:06:30 -03:00
helpline.c perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
helpline.h perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
keysyms.h perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
libslang.h perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
progress.c perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
progress.h perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
setup.c perf ui: Make --stdio default when TUI is not supported 2012-05-28 13:29:54 -03:00
ui.h perf tools: Move UI bits to tools/perf/ui directory 2012-04-11 17:16:40 -03:00
util.c perf ui: Introduce struct perf_error_ops 2012-06-19 13:06:18 -03:00
util.h perf ui: Introduce struct perf_error_ops 2012-06-19 13:06:18 -03:00