From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4831 invoked by alias); 14 May 2011 03:41:28 -0000 Received: (qmail 4821 invoked by uid 22791); 14 May 2011 03:41:28 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 14 May 2011 03:41:13 +0000 Received: by fxm18 with SMTP id 18so2668254fxm.0 for ; Fri, 13 May 2011 20:41:12 -0700 (PDT) Received: by 10.223.95.198 with SMTP id e6mr341246fan.13.1305344472359; Fri, 13 May 2011 20:41:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.105.74 with HTTP; Fri, 13 May 2011 20:40:52 -0700 (PDT) From: Hui Zhu Date: Sat, 14 May 2011 03:41:00 -0000 Message-ID: Subject: [OB] Fix build error in ui-file.c To: gdb-patches ml Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00334.txt.bz2 Get error with trunk: gcc -g -O2 -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR=3D"\"/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=3D1 -DTUI=3D1 -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 =91stdio_file_write_async_safe=92: ../../src/gdb/ui-file.c:583: error: ignoring return value of =91write=92, declared with attribute warn_unused_result Fix it like others in this file. 2011-05-14 Hui Zhu * ui-file.c (stdio_file_write_async_safe): Add empty check for build. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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