Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [OB] Fix build error in ui-file.c
@ 2011-05-14  3:41 Hui Zhu
  2011-05-14 17:12 ` Joel Brobecker
  0 siblings, 1 reply; 5+ messages in thread
From: Hui Zhu @ 2011-05-14  3:41 UTC (permalink / raw)
  To: gdb-patches ml

Get error with trunk:
gcc -g -O2   -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
-DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd
-I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber
-I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib -Ignulib
-DMI_OUT=1 -DTUI=1  -DGDBTK -I/usr/include/python2.6
-I/usr/include/python2.6 -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
-Werror -c -o ui-file.o -MT ui-file.o -MMD -MP -MF .deps/ui-file.Tpo
../../src/gdb/ui-file.c
cc1: warnings being treated as errors
../../src/gdb/ui-file.c: In function ‘stdio_file_write_async_safe’:
../../src/gdb/ui-file.c:583: error: ignoring return value of ‘write’,
declared with attribute warn_unused_result

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.

===================================================================
RCS file: /cvs/src/src/gdb/ui-file.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- src/gdb/ui-file.c	2011/05/13 17:28:20	1.27
+++ src/gdb/ui-file.c	2011/05/14 03:37:18	1.28
@@ -580,7 +580,8 @@
       return;
     }

-  write (stdio->fd, buf, length_buf);
+  if (write (stdio->fd, buf, length_buf))
+    ;
 }

 static void


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-16 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-14  3:41 [OB] Fix build error in ui-file.c Hui Zhu
2011-05-14 17:12 ` Joel Brobecker
2011-05-15  2:59   ` Hui Zhu
2011-05-16 16:08     ` Tom Tromey
2011-05-16 18:26       ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox