From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16931 invoked by alias); 7 Nov 2012 05:34:32 -0000 Received: (qmail 16252 invoked by uid 22791); 7 Nov 2012 05:34:30 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Nov 2012 05:34:24 +0000 Received: by mail-pb0-f41.google.com with SMTP id rq2so1000484pbb.0 for ; Tue, 06 Nov 2012 21:34:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.66.87.167 with SMTP id az7mr9253784pab.69.1352266463629; Tue, 06 Nov 2012 21:34:23 -0800 (PST) Received: by 10.68.19.138 with HTTP; Tue, 6 Nov 2012 21:34:23 -0800 (PST) In-Reply-To: <20121107010714.GQ31965@bubble.grove.modra.org> References: <20121107003007.GA8682@gmail.com> <20121107010714.GQ31965@bubble.grove.modra.org> Date: Wed, 07 Nov 2012 05:34:00 -0000 Message-ID: Subject: Re: PATCH: PR binutils/14813: Wrong return type for opncls_bclose From: "H.J. Lu" To: Binutils , GDB Content-Type: text/plain; charset=ISO-8859-1 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: 2012-11/txt/msg00134.txt.bz2 On Tue, Nov 6, 2012 at 5:07 PM, Alan Modra wrote: > On Tue, Nov 06, 2012 at 04:30:07PM -0800, H.J. Lu wrote: >> Hi, >> >> This patch changes return type of bclose to bfd_boolean. It fixes >> binutils/bfdtest2. OK to install? > > Not without checking gdb code too. > Sure. Here is the GDB patch. OK to install? -- H.J. --- 2012-11-06 H.J. Lu * jit.c (mem_bfd_iovec_close): Change return type to bfd_boolean. * remote.c (remote_bfd_iovec_close): Likewise. * solib-spu.c (spu_bfd_iovec_close): Likewise. * spu-linux-nat.c (bfd_boolean): Likewise. diff --git a/gdb/jit.c b/gdb/jit.c index 9e8f295..98a92a3 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -85,11 +85,11 @@ mem_bfd_iovec_open (struct bfd *abfd, void *open_closure) /* Closing the file is just freeing the base/size pair on our side. */ -static int +static bfd_boolean mem_bfd_iovec_close (struct bfd *abfd, void *stream) { xfree (stream); - return 1; + return TRUE; } /* For reading the file, we just need to pass through to target_read_memory and diff --git a/gdb/remote.c b/gdb/remote.c index 24bb9bc..0af4265 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -9774,7 +9774,7 @@ remote_bfd_iovec_open (struct bfd *abfd, void *open_closure) return stream; } -static int +static bfd_boolean remote_bfd_iovec_close (struct bfd *abfd, void *stream) { int fd = *(int *)stream; @@ -9786,7 +9786,7 @@ remote_bfd_iovec_close (struct bfd *abfd, void *stream) connection was already torn down. */ remote_hostio_close (fd, &remote_errno); - return 1; + return TRUE; } static file_ptr diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index f62d96c..1c4f450 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -282,11 +282,11 @@ spu_bfd_iovec_open (bfd *nbfd, void *open_closure) return open_closure; } -static int +static bfd_boolean spu_bfd_iovec_close (bfd *nbfd, void *stream) { xfree (stream); - return 1; + return TRUE; } static file_ptr diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index 1932aae..5d2f752 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -273,11 +273,11 @@ spu_bfd_iovec_open (struct bfd *nbfd, void *open_closure) return open_closure; } -static int +static bfd_boolean spu_bfd_iovec_close (struct bfd *nbfd, void *stream) { xfree (stream); - return 1; + return TRUE; } static file_ptr