diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-19 21:16:45 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-19 21:16:45 +0000 |
commit | 12ac5344274cfcf1e8010b5168ae80c3565627da (patch) | |
tree | 5c7685176e01006bf7be17770fdf35adb05d2acc /libiberty/pex-unix.c | |
parent | 6f57677842a83543b881e6444525b36be8931c52 (diff) | |
download | gcc-12ac5344274cfcf1e8010b5168ae80c3565627da.tar.gz |
* pex-unix.c (pex_child_error): Define writeerr macro to avoid
unused result warnings from write(3) calls. Undefine writeerr
after all uses.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154344 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/pex-unix.c')
-rw-r--r-- | libiberty/pex-unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c index baf2bb4995b..3753812b314 100644 --- a/libiberty/pex-unix.c +++ b/libiberty/pex-unix.c @@ -368,7 +368,7 @@ static void pex_child_error (struct pex_obj *obj, const char *executable, 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 (": error trying to exec '"); writeerr (executable); @@ -377,6 +377,7 @@ pex_child_error (struct pex_obj *obj, const char *executable, writeerr (": "); writeerr (xstrerror (err)); writeerr ("\n"); +#undef writeerr _exit (-1); } |