Skip to content

Commit

Permalink
uml: helper.c warning corrections
Browse files Browse the repository at this point in the history
Fix this warning:

  arch/um/os-Linux/helper.c: In function `helper_child':
  arch/um/os-Linux/helper.c:38:7: warning: ignoring return value of `write', declared with attribute warn_unused_result

[richard@nod.at: happens only with -D_FORTIFY_SOURCE=2]
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Vitaliy Ivanov authored and Linus Torvalds committed Jul 26, 2011
1 parent 7a99ae7 commit 2fdf213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/um/os-Linux/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ static int helper_child(void *arg)
{
struct helper_data *data = arg;
char **argv = data->argv;
int err;
int err, ret;

if (data->pre_exec != NULL)
(*data->pre_exec)(data->pre_data);
err = execvp_noalloc(data->buf, argv[0], argv);

/* If the exec succeeds, we don't get here */
write(data->fd, &err, sizeof(err));
CATCH_EINTR(ret = write(data->fd, &err, sizeof(err)));

return 0;
}
Expand Down

0 comments on commit 2fdf213

Please sign in to comment.