mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
perfcounter: Handle some IO return values
Building perfcounter tools raises the following warnings: builtin-record.c: In function ‘atexit_header’: builtin-record.c:464: erreur: ignoring return value of ‘pwrite’, declared with attribute warn_unused_result builtin-record.c: In function ‘__cmd_record’: builtin-record.c:503: erreur: ignoring return value of ‘read’, declared with attribute warn_unused_result builtin-report.c: In function ‘__cmd_report’: builtin-report.c:1403: erreur: ignoring return value of ‘read’, declared with attribute warn_unused_result This patch handles these IO return values. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1245456100-5477-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
92bf309a9c
commit
eadc84cc01
2 changed files with 11 additions and 3 deletions
|
@ -1400,7 +1400,10 @@ static int __cmd_report(void)
|
|||
exit(0);
|
||||
}
|
||||
|
||||
read(input, &file_header, sizeof(file_header));
|
||||
if (read(input, &file_header, sizeof(file_header)) == -1) {
|
||||
perror("failed to read file headers");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (sort__has_parent &&
|
||||
!(file_header.sample_type & PERF_SAMPLE_CALLCHAIN)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue