diff options
author | Geoff Levand <geoff@infradead.org> | 2013-10-03 20:19:34 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-10-04 09:00:54 +0900 |
commit | e9df14dcef5bde6e77760243783c07b4533ee7dc (patch) | |
tree | f614dd264c465c1f19ecf15e6bce2a1ed0520007 | |
parent | 83911ebb61053b3536a7be20793ec76405c23389 (diff) |
kexec: Fix return value build warnings
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’
Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/fs2dt.c | 5 |
1 files 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); |