eval: Use sh_warnx instead of warnx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Antonio Ospite <ao2@xxxxxx> 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.

---8<---
This patch fixes a typo in evalbltin where warnx was used instead
of sh_warnx.

Reported-by: Antonio Ospite <ao2@xxxxxx>
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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux