aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-file.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-05-14 05:44:37 +0000
committerDoug Evans <dje@google.com>2011-05-14 05:44:37 +0000
commit9f7bc58762d1cf691e917f9116961aa3faaf721d (patch)
tree5a28718a9bc26f70043df67db52efcf4745e3f86 /gdb/ui-file.c
parent093cee7d54d23c98e9efca824653d4e63f95b222 (diff)
downloadgdb-9f7bc58762d1cf691e917f9116961aa3faaf721d.zip
gdb-9f7bc58762d1cf691e917f9116961aa3faaf721d.tar.gz
gdb-9f7bc58762d1cf691e917f9116961aa3faaf721d.tar.bz2
* ui-file.c (stdio_file_write_async_safe): Add comment.
Diffstat (limited to 'gdb/ui-file.c')
-rw-r--r--gdb/ui-file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index 6bb2342..ce270f6 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))
;
}