Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: Fix most -Wmissing-prototypes -Wmissing-declarations warnings
Date: Sun, 22 Feb 2009 01:06:00 -0000	[thread overview]
Message-ID: <200902211621.12228.pedro@codesourcery.com> (raw)
In-Reply-To: <m3ocwzzf5g.fsf@fleche.redhat.com>

On Wednesday 18 February 2009 20:03:23, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> 
> Pedro> With all the latest talk about declarations and prototypes, I
> Pedro> got curious and tried building GDB on x86_64-linux with
> Pedro> `-Wmissing-declarations -Wmissing-prototypes' added to
> Pedro> WARN_CFLAGS, like so:
> 
> Nice.  I'm in favor of going this route.  It seems to me that this can
> catch real bugs and doesn't really have a downside.

I've created PR build/9877 for this.

Maintainers of each native configuration are encouraged to fix these
warnings for their hosts.

> 
> Pedro> E.g., notice that a few functions here are really unnused and
> Pedro> should probably either be deleted, or there's a bug hiding in
> Pedro> there: e.g., i386-nat.c:child_post_startup_inferior or
> Pedro> ada-typeprint.c:ada_typedef_print.
> 
> The ada_typedef_print thing is a known oddity:
> 
> http://sourceware.org/ml/gdb-patches/2008-09/msg00541.html
> 
> I was hoping an Ada maintainer would deal with this.

Yeah, me too.  I didn't know if we should delete it or if it
should be being used in the language vector but it had been missed.
I see Joel handled it already.  Thanks!

> Pedro> I've also tried adding "-Wmissing-prototypes", but it shows up a
> Pedro> few more issues than I have energy at the moment to look at.
> 
> Did you mean some other option here?

Yeah, I meant -Wstrict-prototypes.  E.g.,

 In file included from ../../src/gdb/../readline/../readline/readline.h:37,
                  from ../../src/gdb/corelow.c:43:
 ../../src/gdb/../readline/../readline/rltypedefs.h:35: aviso: function declaration isn’t a prototype
 ../../src/gdb/../readline/../readline/rltypedefs.h:36: aviso: function declaration isn’t a prototype
 ../../src/gdb/../readline/../readline/rltypedefs.h:37: aviso: function declaration isn’t a prototype
 ../../src/gdb/../readline/../readline/rltypedefs.h:38: aviso: function declaration isn’t a prototype

I've created PR build/9878 for this one.

-- 
Pedro Alves


      parent reply	other threads:[~2009-02-21 16:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18  4:11 Pedro Alves
2009-02-18  4:12 ` Pedro Alves
2009-02-18 14:27 ` Mark Kettenis
2009-02-18 17:34   ` Pedro Alves
2009-02-20  0:09     ` Mark Kettenis
2009-02-22 11:19       ` Pedro Alves
2009-02-18 22:54 ` Tom Tromey
2009-02-20  0:46   ` Joel Brobecker
2009-02-20  4:01     ` Tom Tromey
2009-02-20  5:43       ` Tom Tromey
2009-02-20 10:02       ` Joel Brobecker
2009-02-22  1:06   ` Pedro Alves [this message]

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=200902211621.12228.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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