From: Simon Horman <horms@verge.net.au>
To: Geoff Levand <geoff@infradead.org>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH 1/2] kexec: Fix return value build warnings
Date: Fri, 4 Oct 2013 09:02:53 +0900 [thread overview]
Message-ID: <20131004000253.GH29457@verge.net.au> (raw)
In-Reply-To: <de03f66db26d0fb6b6dc90e80cfbfac0eec14122.1380830946.git.geoff@infradead.org>
On Thu, Oct 03, 2013 at 08:19:34PM +0000, Geoff Levand wrote:
> Add a local variable 'result' to the putnode() routine of
> ds2dt and use it to hold return values of calls to read().
>
> Fixes build warnings like these:
>
> kexec/fs2dt.c: warning: ignoring return value of ‘read’
Thanks, applied.
>
> Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
> ---
> kexec/fs2dt.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
> index 1f5b0cf..98d6cb4 100644
> --- a/kexec/fs2dt.c
> +++ b/kexec/fs2dt.c
> @@ -555,6 +555,7 @@ static void putnode(void)
> /* Add cmdline to the second kernel. Check to see if the new
> * cmdline has a root=. If not, use the old root= cmdline. */
> if (!strcmp(basename,"chosen/")) {
> + size_t result;
> size_t cmd_len = 0;
> char *param = NULL;
> char filename[MAXPATH];
> @@ -636,7 +637,7 @@ static void putnode(void)
> close(fd);
> goto no_debug;
> }
> - read(fd, buff, statbuf.st_size);
> + result = read(fd, buff, statbuf.st_size);
> close(fd);
> strncpy(filename, "/proc/device-tree/", MAXPATH);
> strncat(filename, buff, MAXPATH);
> @@ -659,7 +660,7 @@ static void putnode(void)
> close(fd);
> goto no_debug;
> }
> - read(fd, buff, statbuf.st_size);
> + result = read(fd, buff, statbuf.st_size);
> if (!strcmp(buff, "hvterm1") || !strcmp(buff, "hvterm-protocol"))
> my_debug = 1;
> close(fd);
> --
> 1.8.1.2
>
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-10-04 0:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 20:54 [PATCH 0/6] kexec-tools fixes Geoff Levand
2013-10-02 20:49 ` [PATCH 1/6] kexec: Fix the -? option Geoff Levand
2013-10-02 20:49 ` [PATCH 2/6] kexec: Remove unused -? option handling Geoff Levand
2013-10-02 20:49 ` [PATCH 4/6] kexec: Fix uninitialized build warning Geoff Levand
2013-10-02 20:49 ` [PATCH 5/6] kexec: Fix return value build warnings Geoff Levand
2013-10-03 1:06 ` Simon Horman
2013-10-03 20:19 ` [PATCH 0/2] V2 " Geoff Levand
2013-10-03 20:19 ` [PATCH 2/2] kexec: Handle read errors in fs2dt setup Geoff Levand
2013-10-04 0:02 ` Simon Horman
2013-10-03 20:19 ` [PATCH 1/2] kexec: Fix return value build warnings Geoff Levand
2013-10-04 0:02 ` Simon Horman [this message]
2013-10-02 20:49 ` [PATCH 3/6] purgatory: Fix out-of-source build error Geoff Levand
2013-10-02 20:49 ` [PATCH 6/6] config: Update to automake-1.11 Geoff Levand
2013-10-03 1:07 ` [PATCH 0/6] kexec-tools fixes Simon Horman
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=20131004000253.GH29457@verge.net.au \
--to=horms@verge.net.au \
--cc=geoff@infradead.org \
--cc=kexec@lists.infradead.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