From: Kevin Winchester <kjwinchester@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Paul Mackerras" <paulus@samba.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: tools/perf compile error: ignoring return value of 'read', declared with attribute warn_unused_result
Date: Thu, 02 Jul 2009 20:49:35 -0300 [thread overview]
Message-ID: <4A4D478F.8090304@gmail.com> (raw)
In-Reply-To: <20090702074419.GB19187@elte.hu>
Ingo Molnar wrote:
> * Kevin Winchester <kjwinchester@gmail.com> wrote:
>
>> CC builtin-stat.o
>> cc1: warnings being treated as errors
>> builtin-stat.c: In function 'run_perf_stat':
>> builtin-stat.c:243: error: ignoring return value of 'read', declared with attribute warn_unused_result
>> builtin-stat.c:256: error: ignoring return value of 'read', declared with attribute warn_unused_result
>> make: *** [builtin-stat.o] Error 1
>>
>> Apparently my version of gcc and/or glibc do not agree with -Werror. Would the fix be as simple as:
>>
>> if *read(go_pipe[0], &buf, 1) < 0) {
>> perror("Failed to read go_pipe.");
>> exit(1);
>> }
>>
>> ?
>
> Yeah, that's Ubuntu doing some must-check-warnings via headers,
> right?
>
> Frederic fixed a bug there yesterday - mind checking the latest
> perfcounters code at:
>
> http://people.redhat.com/mingo/tip.git/README
>
> ?
>
It's Gentoo, actually, but likely the same issue. I checked tip/master and it does not show the problem.
Thanks for taking the time to look into it,
--
Kevin Winchester
prev parent reply other threads:[~2009-07-02 23:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 23:43 tools/perf compile error: ignoring return value of 'read', declared with attribute warn_unused_result Kevin Winchester
2009-07-02 7:44 ` Ingo Molnar
2009-07-02 23:49 ` Kevin Winchester [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A4D478F.8090304@gmail.com \
--to=kjwinchester@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox