From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12836 invoked by alias); 11 Jun 2009 02:14:49 -0000 Received: (qmail 12817 invoked by uid 22791); 11 Jun 2009 02:14:48 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f228.google.com (HELO mail-ew0-f228.google.com) (209.85.219.228) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 02:14:40 +0000 Received: by ewy28 with SMTP id 28so1021280ewy.24 for ; Wed, 10 Jun 2009 19:14:37 -0700 (PDT) Received: by 10.210.40.10 with SMTP id n10mr2519956ebn.23.1244686477314; Wed, 10 Jun 2009 19:14:37 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 7sm508908eyg.37.2009.06.10.19.14.36 (version=SSLv3 cipher=RC4-MD5); Wed, 10 Jun 2009 19:14:36 -0700 (PDT) Message-ID: <4A306B61.7030205@gmail.com> Date: Thu, 11 Jun 2009 02:14:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Paul Pluzhnikov CC: binutils@sourceware.org, Dave Korn , Tom Tromey , gdb-patches ml Subject: Re: How to get file descriptor from abfd? References: <8ac60eac0905311056l3b8edf98rc6abfe28853e0b6d@mail.gmail.com> <4A22CB56.3070704@gmail.com> <8ac60eac0906012254o57756790y9bb4eb23d1d6e5a1@mail.gmail.com> <8ac60eac0906080910x6497e1abg5c7aa9bdf863c5d5@mail.gmail.com> <4A2FD0A7.2090408@gmail.com> <8ac60eac0906101009r831248ej4638bb0cf12b8305@mail.gmail.com> In-Reply-To: <8ac60eac0906101009r831248ej4638bb0cf12b8305@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2009-06/txt/msg00287.txt.bz2 Paul Pluzhnikov wrote: > The braces introduce a new scope for 'FILE *f'. > If I move the declaration to the top of function, then it fails to build > when !HAVE_MMAP: > > cc1: warnings being treated as errors > ../../src/bfd/cache.c: In function 'cache_bmmap': > ../../src/bfd/cache.c:404: warning: unused variable 'f' > > I left this "as is". Yes, of course you are correct here; I forgot the complication of the #if relating to whether the variable was needed or not. cheers, DaveK