From: Tom Tromey Date: Wed, 18 May 2022 16:13:32 +0000 (-0600) Subject: ODR warning for "main" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=527907e0e61e50708b1bbdcc95cf53b6b9562217;p=binutils-gdb.git 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 --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,