This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] [mingw] build fix on -Wmissing-prototypes
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: asmwarrior <asmwarrior at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 2 Mar 2012 06:41:50 +0100
- Subject: [commit] [mingw] build fix on -Wmissing-prototypes
- References: <4F502B16.2010606@gmail.com>
Hi,
On Fri, 02 Mar 2012 03:06:14 +0100, asmwarrior wrote:
> Some compiler options were added recently, which did more strict checking,
> thus break the mingw build of gdb.
checked in after an off-list mail.
BTW your patch had corrupted whitespaces, your MUA used Content-type
"format=flowed". If you do not have a different MUA it is better to use
regular text/plain attachment instead.
I did not compile it myself but it looks clear enough.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2012-03/msg00051.html
--- src/gdb/ChangeLog 2012/03/02 01:55:15 1.13933
+++ src/gdb/ChangeLog 2012/03/02 05:38:46 1.13934
@@ -1,3 +1,10 @@
+2012-03-02 Zhang Yuanhui <asmwarrior@gmail.com>
+
+ Fix -Wmissing-prototypes build.
+ * windows-nat.c (dll_symbol_command, ctrl_c_handler): Make them static.
+ (_initialize_windows_nat, _initialize_check_for_gdb_ini)
+ (_initialize_loadable): New prototypes.
+
2012-03-02 Doug Evans <dje@google.com>
* dwarf2read.c (load_full_comp_unit): Remove unnecessary reading of
--- src/gdb/windows-nat.c 2012/02/02 20:19:16 1.224
+++ src/gdb/windows-nat.c 2012/03/02 05:38:51 1.225
@@ -891,7 +891,7 @@
}
/* Load DLL symbol info. */
-void
+static void
dll_symbol_command (char *args, int from_tty)
{
int n;
@@ -1386,7 +1386,7 @@
handler is in charge of interrupting the inferior using DebugBreakProcess.
Note that this function is not available prior to Windows XP. In this case
we emit a warning. */
-BOOL WINAPI
+static BOOL WINAPI
ctrl_c_handler (DWORD event_type)
{
const int attach_flag = current_inferior ()->attach_flag;
@@ -2512,6 +2512,9 @@
add_info_alias ("dll", "sharedlibrary", 1);
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_windows_nat;
+
void
_initialize_windows_nat (void)
{
@@ -2671,6 +2674,9 @@
? FALSE : TRUE;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_check_for_gdb_ini;
+
void
_initialize_check_for_gdb_ini (void)
{
@@ -2764,8 +2770,12 @@
return size;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_loadable;
+
/* Load any functions which may not be available in ancient versions
of Windows. */
+
void
_initialize_loadable (void)
{