From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3697 invoked by alias); 8 Feb 2007 16:25:25 -0000 Received: (qmail 3655 invoked by uid 22791); 8 Feb 2007 16:25:22 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 08 Feb 2007 16:25:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1HFC5A-0003Lv-8h; Thu, 08 Feb 2007 11:25:12 -0500 Date: Thu, 08 Feb 2007 16:25:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [ob] fix mingw compilation Message-ID: <20070208162512.GB11806@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Vladimir Prus , gdb-patches@sources.redhat.com References: <200701301337.14436.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-02/txt/msg00083.txt.bz2 On Tue, Jan 30, 2007 at 10:23:33PM +0200, Eli Zaretskii wrote: > > From: Vladimir Prus > > Date: Tue, 30 Jan 2007 13:37:14 +0300 > > > > @@ -765,18 +768,20 @@ pipe_windows_close (struct serial *scb) > > static int > > pipe_windows_read (struct serial *scb, size_t count) > > { > > - HANDLE pipeline_out = (HANDLE) _get_osfhandle (scb->fd); > > + HANDLE pipeline_out; > > This one-line change is unnecessary; please put back the original > code, it's perfectly valid C, and shouldn't trigger any warnings or > errors from GCC. > > The other changes are okay. > > Thanks. It's valid either way, of course. In the interests of all getting along, I checked this in (to get the message out of my todo queue :-). -- Daniel Jacobowitz CodeSourcery 2007-02-08 Daniel Jacobowitz * ser-mingw.c (pipe_windows_close): Move variable initialization back up. Index: ser-mingw.c =================================================================== RCS file: /cvs/src/src/gdb/ser-mingw.c,v retrieving revision 1.6 diff -u -p -r1.6 ser-mingw.c --- ser-mingw.c 30 Jan 2007 09:12:43 -0000 1.6 +++ ser-mingw.c 8 Feb 2007 16:21:01 -0000 @@ -768,11 +768,10 @@ pipe_windows_close (struct serial *scb) static int pipe_windows_read (struct serial *scb, size_t count) { - HANDLE pipeline_out; + HANDLE pipeline_out = (HANDLE) _get_osfhandle (scb->fd); DWORD available; DWORD bytes_read; - pipeline_out = (HANDLE) _get_osfhandle (scb->fd); if (pipeline_out == INVALID_HANDLE_VALUE) return -1;