From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 73DEE3955CA3; Thu, 2 Jun 2022 15:29:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73DEE3955CA3 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ODR warning for "main" X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: a7f779c12e6f166e279ce2e189aa009dabaccae7 X-Git-Newrev: 527907e0e61e50708b1bbdcc95cf53b6b9562217 Message-Id: <20220602152959.73DEE3955CA3@sourceware.org> Date: Thu, 2 Jun 2022 15:29:59 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 15:29:59 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D527907e0e61e= 50708b1bbdcc95cf53b6b9562217 commit 527907e0e61e50708b1bbdcc95cf53b6b9562217 Author: Tom Tromey Date: Wed May 18 10:13:32 2022 -0600 ODR warning for "main" =20 "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. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D22395 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) } =20 EXTERN_C void monstartup (unsigned long, unsigned long); -extern int main (); +extern int main (int, char **); =20 static void maintenance_set_profile_cmd (const char *args, int from_tty,