From: Kirill A. Shutemov Date: Mon, 23 Jul 2012 21:06:54 +0000 (+0300) Subject: perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific X-Git-Tag: v3.6-rc1~32^2~21^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cc49d4dc82a39a542a31c1f51ead08a46fd33f1;p=pandora-kernel.git 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 Acked-by: Ulrich Drepper Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Ulrich Drepper Link: http://lkml.kernel.org/r/20120723210654.GA25248@shutemov.name [ committer note: s/assert/BUG_ON/g ] Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed