From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Himanshu Chauhan <hschauhan@nulltrace.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>, greg@kroah.com
Subject: Re: [PATCH] scripts/kallsyms build warning fix
Date: Tue, 26 Jan 2010 11:02:34 +0800 [thread overview]
Message-ID: <2375c9f91001251902p3d632fbdr4c34e43c0973e68f@mail.gmail.com> (raw)
In-Reply-To: <1264455681-10578-1-git-send-email-hschauhan@nulltrace.org>
On Tue, Jan 26, 2010 at 5:41 AM, Himanshu Chauhan
<hschauhan@nulltrace.org> wrote:
> Hi all,
>
> This is a small patch that fixes the build warning
> of scripts/kallsyms.c
>
> Regards
> Himanshu
>
> Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
> ---
> scripts/kallsyms.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 86c3896..e3902fb 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -108,8 +108,10 @@ static int read_symbol(FILE *in, struct sym_entry *s)
> rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str);
> if (rc != 3) {
> if (rc != EOF) {
> - /* skip line */
> - fgets(str, 500, in);
> + /* skip line. sym is used as dummy to
> + * shut of "warn_unused_result" warning.
> + */
> + sym = fgets(str, 500, in);
> }
> return -1;
> }
Why not use the return value to do some useful checking?
next prev parent reply other threads:[~2010-01-26 3:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 21:41 Himanshu Chauhan
2010-01-26 3:02 ` Américo Wang [this message]
2010-01-26 5:13 ` Himanshu Chauhan
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=2375c9f91001251902p3d632fbdr4c34e43c0973e68f@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=greg@kroah.com \
--cc=hschauhan@nulltrace.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®