From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [OB] Fix build error in ui-file.c
Date: Sat, 14 May 2011 03:41:00 -0000 [thread overview]
Message-ID: <BANLkTi=cG1ZSp3VSS3kQ4rpjBEEOs4bGyw@mail.gmail.com> (raw)
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
next reply other threads:[~2011-05-14 3:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-14 3:41 Hui Zhu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=cG1ZSp3VSS3kQ4rpjBEEOs4bGyw@mail.gmail.com' \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox