From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23185 invoked by alias); 18 Mar 2005 18:01:27 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 23030 invoked from network); 18 Mar 2005 18:01:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 18 Mar 2005 18:01:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1DCLmX-0008A1-41; Fri, 18 Mar 2005 13:01:09 -0500 Date: Fri, 18 Mar 2005 19:56:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: binutils@sources.redhat.com Subject: Re: [RFA] Fix compilation warning in libiberty.h Message-ID: <20050318180109.GA31323@nevyn.them.org> Mail-Followup-To: Joel Brobecker , binutils@sources.redhat.com References: <20050318175552.GO1156@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050318175552.GO1156@adacore.com> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-03/txt/msg00536.txt.bz2 On Fri, Mar 18, 2005 at 09:55:52AM -0800, Joel Brobecker wrote: > Hello, > > I noticed that the compiler emits a warning when building bfd.c > in libiberty.h. The compiler we are using is GNAT Pro based on > GCC 3.4.4. Here is the warning we get: > > gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -D_GNU_SOURCE -I. -I.././bfd -I.././bfd/../include -I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c bfd.c -o bfd.o > In file included from bfd.c:209: > .././bfd/../include/libiberty.h:80: warning: function declaration isn't a prototype > > The problem is that this breaks the build because of the -Werror. > > I think the problem is that the prototype is missing a ``void'' keyword. > This fixes the warning. The trouble I had was whether I wanted to use > the PARAMS macro or not. I seem to remember that we wanted to get away > from them, but then the rest of the file uses it. I kept it for now, > for better consistency. > > Joel Brobecker > > * include/libiberty.h,v (basename): Fix prototype definition. > > Tested by building GDB on sparc-solaris 2.8. > OK to apply? No, this is wrong; that's not supposed to be a prototype! You want to be in the other branch of the #if; fix that instead. -- Daniel Jacobowitz CodeSourcery, LLC