public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: binutils@sources.redhat.com
Subject: Re: [RFA] Fix compilation warning in libiberty.h
Date: Fri, 18 Mar 2005 19:56:00 -0000	[thread overview]
Message-ID: <20050318180109.GA31323@nevyn.them.org> (raw)
In-Reply-To: <20050318175552.GO1156@adacore.com>

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  <brobecker@adacore.com>
> 
>         * 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

  reply	other threads:[~2005-03-18 18:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-18 19:54 Joel Brobecker
2005-03-18 19:56 ` Daniel Jacobowitz [this message]
2005-03-31 15:51 [RFA] fix " Jerome Guitton
2005-03-31 16:01 ` Daniel Jacobowitz
2005-03-31 17:08   ` Jerome Guitton
2005-03-31 17:28     ` Daniel Jacobowitz
2005-03-31 17:38       ` Jerome Guitton
2005-04-22 23:03   ` Adam Nemet
2005-04-25  1:44     ` Daniel Jacobowitz
2005-04-25  4:51       ` Adam Nemet
2005-04-26 10:40     ` Jerome Guitton
2005-03-31 21:16 ` Maciej W. Rozycki
2005-03-31 23:29   ` Jerome Guitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050318180109.GA31323@nevyn.them.org \
    --to=drow@false.org \
    --cc=binutils@sources.redhat.com \
    --cc=brobecker@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).