*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / ui-file.c
index 20b072e59174182f32be68141a6c43793f15f2e6..8528793c74de2d1547dd0c9b3acd0f9776114683 100644 (file)
@@ -1,7 +1,6 @@
 /* UI_FILE - a generic STDIO like output stream.
 
-   Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2007-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -580,7 +579,11 @@ stdio_file_write_async_safe (struct ui_file *file,
       return;
     }
 
-  write (stdio->fd, buf, length_buf);
+  /* 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))
+    ;
 }
 
 static void
This page took 0.023715 seconds and 4 git commands to generate.