Commit c22c44ba by Ben Elliston Committed by Ben Elliston

pex-unix.c (pex_child_error): Define writeerr macro to avoid unused result…

pex-unix.c (pex_child_error): Define writeerr macro to avoid unused result warnings from write(3) calls.

	* pex-unix.c (pex_child_error): Define writeerr macro to avoid
	unused result warnings from write(3) calls.  Undefine writeerr
	after all uses.

From-SVN: r154344
parent 872d2094
2009-11-20 Ben Elliston <bje@au.ibm.com>
* pex-unix.c (pex_child_error): Define writeerr macro to avoid
unused result warnings from write(3) calls. Undefine writeerr
after all uses.
2009-10-08 Daniel Gutson <dgutson@codesourcery.com> 2009-10-08 Daniel Gutson <dgutson@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com>
Pedro Alves <pedro@codesourcery.com> Pedro Alves <pedro@codesourcery.com>
......
...@@ -368,7 +368,7 @@ static void ...@@ -368,7 +368,7 @@ static void
pex_child_error (struct pex_obj *obj, const char *executable, pex_child_error (struct pex_obj *obj, const char *executable,
const char *errmsg, int err) const char *errmsg, int err)
{ {
#define writeerr(s) (void) write (STDERR_FILE_NO, s, strlen (s)) #define writeerr(s) if (write (STDERR_FILE_NO, s, strlen (s))) {}
writeerr (obj->pname); writeerr (obj->pname);
writeerr (": error trying to exec '"); writeerr (": error trying to exec '");
writeerr (executable); writeerr (executable);
...@@ -377,6 +377,7 @@ pex_child_error (struct pex_obj *obj, const char *executable, ...@@ -377,6 +377,7 @@ pex_child_error (struct pex_obj *obj, const char *executable,
writeerr (": "); writeerr (": ");
writeerr (xstrerror (err)); writeerr (xstrerror (err));
writeerr ("\n"); writeerr ("\n");
#undef writeerr
_exit (-1); _exit (-1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment