Message ID | 20181120020926.i6hjxecmnpl7oedg@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | eval: Use sh_warnx instead of warnx | expand |
On Tue, 20 Nov 2018 10:09:26 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote: > Antonio Ospite <ao2@ao2.it> wrote: > > > > BTW a new warning was introduced by commit 8e43729 (eval: Report I/O > > error on stdout, 2018-09-07): > > > > CC eval.o > > eval.c: In function ‘evalbltin’: > > eval.c:956:3: warning: implicit declaration of function ‘warnx’; did you mean ‘sh_warnx’? [-Wimplicit-function-declaration] > > warnx("%s: I/O error", commandname); > > ^~~~~ > > sh_warnx > > Thanks for the heads up. > New warnings stand out more with silent rules on. :) The change looks good to me. Thank you, Antonio > ---8<--- > This patch fixes a typo in evalbltin where warnx was used instead > of sh_warnx. > > Reported-by: Antonio Ospite <ao2@ao2.it> > Fixes: 8e43729547b5 ("eval: Report I/O error on stdout") > > diff --git a/src/eval.c b/src/eval.c > index 546ee1b..c27bc35 100644 > --- a/src/eval.c > +++ b/src/eval.c > @@ -953,7 +953,7 @@ evalbltin(const struct builtincmd *cmd, int argc, char **argv, int flags) > status = (*cmd->builtin)(argc, argv); > flushall(); > if (outerr(out1)) > - warnx("%s: I/O error", commandname); > + sh_warnx("%s: I/O error", commandname); > status |= outerr(out1); > exitstatus = status; > cmddone: > -- > Email: Herbert Xu <herbert@gondor.apana.org.au> > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff --git a/src/eval.c b/src/eval.c index 546ee1b..c27bc35 100644 --- a/src/eval.c +++ b/src/eval.c @@ -953,7 +953,7 @@ evalbltin(const struct builtincmd *cmd, int argc, char **argv, int flags) status = (*cmd->builtin)(argc, argv); flushall(); if (outerr(out1)) - warnx("%s: I/O error", commandname); + sh_warnx("%s: I/O error", commandname); status |= outerr(out1); exitstatus = status; cmddone: