The normal way to ignore returns is to cast the result to void
(void)write(...)
Regards
Henrik
fre 2008-07-11 klockan 01:07 +1200 skrev Amos Jeffries:
> ------------------------------------------------------------
> revno: 9076
> committer: Amos Jeffries <squid3_at_treenet.co.nz>
> branch nick: trunk
> timestamp: Fri 2008-07-11 01:07:46 +1200
> message:
> Ubuntu support: fix gcc complaints about function results
>
> Fixes Ubuntu package build failure.
> modified:
> lib/util.c
> vanligt textdokument-bilaga (r9076.diff)
> === modified file 'lib/util.c'
> --- a/lib/util.c 2007-12-06 09:37:15 +0000
> +++ b/lib/util.c 2008-07-10 13:07:46 +0000
> @@ -931,8 +931,9 @@
> void
> default_failure_notify(const char *message)
> {
> - write(2, message, strlen(message));
> - write(2, "\n", 1);
> + ssize_t tmp;
> + tmp = write(2, message, strlen(message));
> + tmp = write(2, "\n", 1);
> abort();
> }
>
>
Received on Thu Jul 10 2008 - 22:59:06 MDT
This archive was generated by hypermail 2.2.0 : Fri Jul 11 2008 - 12:00:04 MDT