This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [OB] Fix build error in ui-file.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Sat, 14 May 2011 10:12:04 -0700
- Subject: Re: [OB] Fix build error in ui-file.c
- References: <BANLkTi=cG1ZSp3VSS3kQ4rpjBEEOs4bGyw@mail.gmail.com>
> Fix it like others in this file.
>
> 2011-05-14 Hui Zhu <teawater@gmail.com>
>
> * ui-file.c (stdio_file_write_async_safe): Add empty check for build.
Personally, I think we're just sweeping the problem under the rug.
I'd rather have something like this:
> - write (stdio->fd, buf, length_buf);
> + if (write (stdio->fd, buf, length_buf))
> + ;
if (write (stdio->fd, buf, length_buf) < 0)
/* Ignore this error *because*... */;
--
Joel