From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17155 invoked by alias); 18 Mar 2005 17:56:11 -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 17009 invoked from network); 18 Mar 2005 17:55:58 -0000 Received: from unknown (HELO priv-edtnes46.telusplanet.net) (199.185.220.240) by sourceware.org with SMTP; 18 Mar 2005 17:55:58 -0000 Received: from takamaka.act-europe.fr ([142.179.108.108]) by priv-edtnes46.telusplanet.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050318175558.LQBO17324.priv-edtnes46.telusplanet.net@takamaka.act-europe.fr> for ; Fri, 18 Mar 2005 10:55:58 -0700 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 4A21347DC0; Fri, 18 Mar 2005 09:55:52 -0800 (PST) Date: Fri, 18 Mar 2005 19:54:00 -0000 From: Joel Brobecker To: binutils@sources.redhat.com Subject: [RFA] Fix compilation warning in libiberty.h Message-ID: <20050318175552.GO1156@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k4f25fnPtRuIRUb3" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2005-03/txt/msg00535.txt.bz2 --k4f25fnPtRuIRUb3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1058 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? Thanks, -- Joel --k4f25fnPtRuIRUb3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="libiberty.h.diff" Content-length: 736 Index: include/libiberty.h =================================================================== RCS file: /cvs/src/src/include/libiberty.h,v retrieving revision 1.31 diff -u -p -r1.31 libiberty.h --- include/libiberty.h 10 Mar 2005 01:05:51 -0000 1.31 +++ include/libiberty.h 18 Mar 2005 17:38:07 -0000 @@ -77,7 +77,7 @@ extern char **dupargv PARAMS ((char **)) #if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME) extern char *basename PARAMS ((const char *)); #else -extern char *basename (); +extern char *basename PARAMS ((void)); #endif #endif --k4f25fnPtRuIRUb3--