gdb/
authorYao Qi <yao@codesourcery.com>
Fri, 2 Mar 2012 12:56:50 +0000 (12:56 +0000)
committerYao Qi <yao@codesourcery.com>
Fri, 2 Mar 2012 12:56:50 +0000 (12:56 +0000)
Fix -Wmissing-prototypes build.
* charset.c (phony_iconv_open): Make static.
(phony_iconv_close, phony_iconv): Likewise.
* i386-linux-nat.c (_initialize_i386_linux_nat): New prototype.
* i386-windows-nat.c (_initialize_i386_windows_nat): New
prototype.
* mingw-hdep.c (_initialize_mingw_hdep): New prototype.
* ser-mingw.c (create_select_thread): Make static.
* windows-termcap.c (tgetent): New prototype.
(tgetnum, tgetflag, tgetstr, tputs, tgoto): Likewise.

gdb/ChangeLog
gdb/charset.c
gdb/i386-linux-nat.c
gdb/i386-windows-nat.c
gdb/mingw-hdep.c
gdb/ser-mingw.c
gdb/windows-termcap.c

index dc324ddab726f5181b9975441b68056ea3b86ebe..fbb62a7eabcc632a30b25ad7a57ba7e59e9e5ca3 100644 (file)
@@ -1,3 +1,16 @@
+2012-03-02  Yao Qi  <yao@codesourcery.com>
+
+       Fix -Wmissing-prototypes build.
+       * charset.c (phony_iconv_open): Make static.
+       (phony_iconv_close, phony_iconv): Likewise.
+       * i386-linux-nat.c (_initialize_i386_linux_nat): New prototype.
+       * i386-windows-nat.c (_initialize_i386_windows_nat): New
+       prototype.
+       * mingw-hdep.c (_initialize_mingw_hdep): New prototype.
+       * ser-mingw.c (create_select_thread): Make static.
+       * windows-termcap.c (tgetent): New prototype.
+       (tgetnum, tgetflag, tgetstr, tputs, tgoto): Likewise.
+
 2012-03-02  Zhang Yuanhui  <asmwarrior@gmail.com>
 
        Fix -Wmissing-prototypes build.
index 16dab6b9fc0a8e74b5cf7a22f97b14f4e3c20f83..4a209a553cb3a1fcbf2fb117848f6a83175fbeb1 100644 (file)
 #define EILSEQ ENOENT
 #endif
 
-iconv_t
+static iconv_t
 phony_iconv_open (const char *to, const char *from)
 {
   /* We allow conversions from UTF-32BE, wchar_t, and the host charset.
@@ -124,13 +124,13 @@ phony_iconv_open (const char *to, const char *from)
   return !strcmp (from, "UTF-32BE");
 }
 
-int
+static int
 phony_iconv_close (iconv_t arg)
 {
   return 0;
 }
 
-size_t
+static size_t
 phony_iconv (iconv_t utf_flag, const char **inbuf, size_t *inbytesleft,
             char **outbuf, size_t *outbytesleft)
 {
index 38e70276d49fccb57f46fb593c4555a9170f312f..ac1629ac795b2bdf7cf1789c648218ce3c685fde 100644 (file)
@@ -1008,6 +1008,9 @@ i386_linux_read_description (struct target_ops *ops)
     return tdesc_i386_linux;
 }
 
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_i386_linux_nat;
+
 void
 _initialize_i386_linux_nat (void)
 {
index 9c467fb60985801fc829100e64281874107d6a73..5d93915a72a953ad9467c8bbcfb9675e9048106f 100644 (file)
@@ -70,6 +70,9 @@ static const int mappings[] =
 };
 #undef context_offset
 
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_i386_windows_nat;
+
 void
 _initialize_i386_windows_nat (void)
 {
index 331708f9d5468b21dbf2ae9c9d574ec3acaf5743..ed06c5661f55921648e45baacfe72321522b7b38 100644 (file)
@@ -251,6 +251,9 @@ gdb_call_async_signal_handler (struct async_signal_handler *handler,
   SetEvent (sigint_event);
 }
 
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_mingw_hdep;
+
 void
 _initialize_mingw_hdep (void)
 {
index d862868984a6b94a894b9a6cd63201cc4d1cc775..cf7c8b7fdec03ac99202d4e0440e8713d20346a4 100644 (file)
@@ -428,7 +428,7 @@ typedef DWORD WINAPI (*thread_fn_type)(void *);
 
 /* Create a new select thread for SCB executing THREAD_FN.  The STATE
    will be filled in by this function before return.  */
-void
+static void
 create_select_thread (thread_fn_type thread_fn,
                      struct serial *scb,
                      struct ser_console_state *state)
index a70b6e8416a09b24738580877000a60fe02b3385..7f946ea0a8b11ac53f9689b34f5dc58757f43066 100644 (file)
 
 #include <stdlib.h>
 
+/* -Wmissing-prototypes */
+extern int tgetent (char *buffer, char *termtype);
+extern int tgetnum (char *name);
+extern int tgetflag (char *name);
+extern char* tgetstr (char *name, char **area);
+extern int tputs (char *string, int nlines, int (*outfun) ());
+extern char *tgoto (const char *cap, int col, int row);
+
 /* Each of the files below is a minimal implementation of the standard
    termcap function with the same name, suitable for use in a Windows
    console window.  */