This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: silence warning in libiberty/pex-unix.c


> > -#define writeerr(s) write (STDERR_FILE_NO, s, strlen (s))
> > +#define writeerr(s) if (write (STDERR_FILE_NO, s, 0) < 0) _exit (-1)
> 
> Just cast the result to (void).  I'll preapprove that patch if that
> works.

Casting function results to (void) is insufficient to eliminate the
warning.  Whether or not that is a bug is debatable, but I certainly
expected it to work when I first tried it.

Ben



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]