linux/tools/perf
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
..
arch perf tools: Use scnprintf where applicable 2012-03-14 12:36:19 -03:00
bench perf bench: Fix confused variable namings and descriptions in mem subsystem 2012-07-02 14:35:45 -03:00
config perf ui/gtk: Add GTK info_bar widget to browser window 2012-06-19 13:06:19 -03:00
Documentation perf bench: Fix confused variable namings and descriptions in mem subsystem 2012-07-02 14:35:45 -03:00
python perf python: Use attr.watermark in twatch.py 2012-01-30 18:38:23 -02:00
scripts perf script: Add drop monitor script 2011-09-29 16:41:37 -03:00
ui perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific 2012-07-25 11:46:04 -03:00
util perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific 2012-07-25 11:46:04 -03:00
.gitignore perf tools: Ignore auto-generated bison/flex files 2012-04-14 13:50:39 -03:00
builtin-annotate.c perf tools: Convert critical messages to ui__error() 2012-05-29 11:53:42 -03:00
builtin-bench.c perf bench: Documentation update 2012-06-27 13:17:48 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Work better with pipe mode 2012-05-22 13:03:54 -03:00
builtin-diff.c perf diff: Fix to work with new hists design 2012-03-22 15:12:09 -03:00
builtin-evlist.c perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
builtin-help.c
builtin-inject.c perf inject: Fix broken perf inject -b 2012-05-22 12:59:28 -03:00
builtin-kmem.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-kvm.c perf kvm: Do guest-only counting by default 2012-01-06 15:47:37 -02:00
builtin-list.c
builtin-lock.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-probe.c perf probe: Detect probe target when m/x options are absent 2012-05-11 13:58:53 -03:00
builtin-record.c perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
builtin-report.c perf report: Delay sample_type checks in pipe mode 2012-06-27 13:19:14 -03:00
builtin-sched.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-script.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-stat.c Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core 2012-06-20 13:41:53 +02:00
builtin-test.c perf test: Add dso data caching tests 2012-07-25 11:33:17 -03:00
builtin-timechart.c perf report: Accept fifos as input file 2011-12-23 17:01:03 -02:00
builtin-top.c perf symbols: Factor DSO symtab types to generic binary types 2012-07-25 11:32:36 -03:00
builtin.h perf tools: Make perf.data more self-descriptive (v8) 2011-10-07 17:01:24 -03:00
command-list.txt
CREDITS
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile perf test: Add dso data caching tests 2012-07-25 11:33:17 -03:00
MANIFEST perf tools: Fix make tarballs 2012-05-30 15:05:59 -03:00
perf-archive.sh perf archive: Correct cutting of symbolic link 2012-04-14 13:52:15 -03:00
perf.c perf tools: Simplify debugfs mountpoint handling code 2011-11-28 10:11:28 -02:00
perf.h perf record: Fix branch_stack type in perf_record_opts 2012-05-25 18:32:44 -03:00