public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ODR warning for "main" Date: Thu, 2 Jun 2022 15:29:59 +0000 (GMT) [thread overview] Message-ID: <20220602152959.73DEE3955CA3@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=527907e0e61e50708b1bbdcc95cf53b6b9562217 commit 527907e0e61e50708b1bbdcc95cf53b6b9562217 Author: Tom Tromey <tromey@adacore.com> Date: Wed May 18 10:13:32 2022 -0600 ODR warning for "main" "main" is redeclared with a different type in maint.c. I think this might have come from my first gdb patch, many many years ago. While I wonder if this profiling code is actually useful at all any more, in the meantime it's simple to fix the declaration. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395 Diff: --- gdb/maint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/maint.c b/gdb/maint.c index 31b8fd8322e..289560957f2 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -799,7 +799,7 @@ mcleanup_wrapper (void) } EXTERN_C void monstartup (unsigned long, unsigned long); -extern int main (); +extern int main (int, char **); static void maintenance_set_profile_cmd (const char *args, int from_tty,
reply other threads:[~2022-06-02 15:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220602152959.73DEE3955CA3@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /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: linkBe 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).