From: Doug Evans Date: Sat, 14 May 2011 05:44:37 +0000 (+0000) Subject: * ui-file.c (stdio_file_write_async_safe): Add comment. X-Git-Tag: sid-snapshot-20110601~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f7bc58762d1cf691e917f9116961aa3faaf721d;p=thirdparty%2Fbinutils-gdb.git * ui-file.c (stdio_file_write_async_safe): Add comment. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a2abac7fe10..5ee25e90b32 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-05-13 Doug Evans + + * ui-file.c (stdio_file_write_async_safe): Add comment. + 2011-05-14 Hui Zhu * ui-file.c (stdio_file_write_async_safe): Add empty check for build. diff --git a/gdb/ui-file.c b/gdb/ui-file.c index 6bb2342e746..ce270f6cce0 100644 --- a/gdb/ui-file.c +++ b/gdb/ui-file.c @@ -580,6 +580,9 @@ stdio_file_write_async_safe (struct ui_file *file, return; } + /* This is written the way it is to avoid a warning from gcc about not using the + result of write (since it can be declared with attribute warn_unused_result). + Alas casting to void doesn't work for this. */ if (write (stdio->fd, buf, length_buf)) ; }