2008-02-21 Pedro Alves <pedro@codesorcery.com>
authorPedro Alves <palves@redhat.com>
Sat, 21 Feb 2009 16:14:50 +0000 (16:14 +0000)
committerPedro Alves <palves@redhat.com>
Sat, 21 Feb 2009 16:14:50 +0000 (16:14 +0000)
Silence a few -Wmissing-prototypes warnings.

PR build/9877:
* amd64-nat.c: Include "amd64-nat.h".
* fork-child.c (_initialize_fork_child): Ditto.
* gcore.c (_initialize_gcore): Ditto.
* inf-ptrace.c: Include "inf-ptrace.h".
(inf_ptrace_store_registers): Make it static.
* linux-nat.c (linux_nat_terminal_ours): Make it static.
(_initialize_linux_nat): Declare before definition.
* linux-tdep.c: Include "linux-tdep.h".
* linux-thread-db.c (_initialize_thread_db): Declare before
definition.
* proc-service.c (_initialize_proc_service): Ditto.
* remote.c (remote_send_printf): Make it static.
* solib.c: Include "solib.h".
* symfile-mem.c (_initialize_symfile_mem): Declare before
definition.
* ada-lang.c (ada_la_decode, ada_match_name)
(ada_suppress_symbol_printing, ada_is_array_type)
(ada_value_ptr_subscript, ada_array_length)
(ada_to_static_fixed_value): Make them static.
(_initialize_ada_language): Declare before definition.
* ada-tasks.c (ada_get_task_number, ada_get_environment_task)
(ada_task_list_changed, ada_new_objfile_observer): Make them
static.
(_initialize_tasks): Declare before definition.
* addrmap.c (_initialize_addrmap): Declare before definition.
* auxv.c (default_auxv_parse): Make it static.
* bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
them static.
* breakpoint.c (remove_sal): Add line break.
(expand_line_sal_maybe): Make it static.
* cp-name-parser.y: Include "cp-support.h".
* cp-valprint.c (cp_find_class_member): Make it static.
* eval.c (value_f90_subarray): Ditto.
* exceptions.c (print_any_exception): Ditto.
* findcmd.c (_initialize_mem_search): Declare before definition.
* frame.c (frame_observer_target_changed): Make it static.
* gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
* inf-child.c: Include "inf-child.h".
* inferior.h (valid_inferior_id): Rename to ...
(valid_gdb_inferior_id): ... this.
* infrun.c (infrun_thread_stop_requested, siginfo_make_value):
Make them static.
* jv-lang.c (java_language_arch_info): Make it static.
* m2-typeprint.c (m2_get_discrete_bounds): Ditto.
* osdata.c (info_osdata_command): Make it static.
* regcache.c (regcache_observer_target_changed): Make it static.
* reverse.c (_initialize_reverse): Declare before definition.
* stabsread.c (cleanup_undefined_types_noname)
(cleanup_undefined_types_1): Make them static.
* symfile.c (place_section): Make it static.
* symtab.c (find_pc_sect_psymtab_closer): Make it static.
* target-descriptions.c (_initialize_target_descriptions): Declare
before definition.
* target.c (default_get_ada_task_ptid, find_default_can_async_p)
(find_default_is_async_p, find_default_supports_non_stop): Make
them static.
(target_supports_non_stop): Add prototype.
(dummy_pid_to_str): Make it static.
* utils.c (_initialize_utils): Declare before definition.
* ada-exp.y (_initialize_ada_exp): Declare before definition.
* solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
* target.h (struct target_ops): Add a prototype to the
to_can_execute_reverse callback.
* macroscope.c (_initialize_macroscope): Declare before definition.
* cp-namespace.c (_initialize_cp_namespace): Declare before definition.
* python/python.c (_initialize_python): Declare before definition.
* tui/tui-command.c: Include "tui/tui-command.h".
* tui/tui-data.c (init_content_element, init_win_info): Make them
static.
* tui/tui-disasm.c: Include "tui/tui-disasm.h".
* tui/tui-interp.c (_initialize_tui_interp): Declare before
definition.
* tui/tui-layout.c: Include "tui/tui-layout.h".
(_initialize_tui_layout): Declare before definition.
* tui/tui-regs.c: Include "tui/tui-regs.h".
(tui_display_reg_element_at_line): Make it static.
(_initialize_tui_regs): Declare before definition.
* tui/tui-stack.c (_initialize_tui_stack): Declare before
definition.
* tui/tui-win.c: Include "tui/tui-win.h".
(_initialize_tui_win): Declare before definition.
(tui_sigwinch_handler): Make it static.  Wrap in ifdef SIGWINCH.
* tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
(tui_get_cmd_list): Add a prototype.
* tui/tui-windata.c: Include tui-windata.h.
* tui/tui-wingeneral.c (box_win): Make it static.
* cli/cli-logging.c (show_logging_command): Make it static.
(_initialize_cli_logging): Declare before definition.
* mi/mi-common.c (_initialize_gdb_mi_common): Declare before
definition.

58 files changed:
gdb/ChangeLog
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-tasks.c
gdb/addrmap.c
gdb/amd64-nat.c
gdb/auxv.c
gdb/bfd-target.c
gdb/breakpoint.c
gdb/cli/cli-logging.c
gdb/cp-name-parser.y
gdb/cp-namespace.c
gdb/cp-valprint.c
gdb/eval.c
gdb/exceptions.c
gdb/findcmd.c
gdb/fork-child.c
gdb/frame.c
gdb/gcore.c
gdb/gnu-v3-abi.c
gdb/inf-child.c
gdb/inf-ptrace.c
gdb/inferior.h
gdb/infrun.c
gdb/jv-lang.c
gdb/linux-nat.c
gdb/linux-tdep.c
gdb/linux-thread-db.c
gdb/m2-typeprint.c
gdb/macroscope.c
gdb/mi/mi-common.c
gdb/osdata.c
gdb/proc-service.c
gdb/python/python.c
gdb/regcache.c
gdb/remote.c
gdb/reverse.c
gdb/solib-svr4.c
gdb/solib.c
gdb/stabsread.c
gdb/symfile-mem.c
gdb/symfile.c
gdb/symtab.c
gdb/target-descriptions.c
gdb/target.c
gdb/target.h
gdb/tui/tui-command.c
gdb/tui/tui-data.c
gdb/tui/tui-disasm.c
gdb/tui/tui-interp.c
gdb/tui/tui-layout.c
gdb/tui/tui-regs.c
gdb/tui/tui-stack.c
gdb/tui/tui-win.c
gdb/tui/tui-win.h
gdb/tui/tui-windata.c
gdb/tui/tui-wingeneral.c
gdb/utils.c

index bce126beb52b9a0f3295ad010463aaa1f27df610..b79ba28fefc0ffa1a208183576cff3c296fdf436 100644 (file)
@@ -1,3 +1,99 @@
+2008-02-21  Pedro Alves  <pedro@codesorcery.com>
+
+       Silence a few -Wmissing-prototypes warnings.
+
+       PR build/9877:
+       * amd64-nat.c: Include "amd64-nat.h".
+       * fork-child.c (_initialize_fork_child): Ditto.
+       * gcore.c (_initialize_gcore): Ditto.
+       * inf-ptrace.c: Include "inf-ptrace.h".
+       (inf_ptrace_store_registers): Make it static.
+       * linux-nat.c (linux_nat_terminal_ours): Make it static.
+       (_initialize_linux_nat): Declare before definition.
+       * linux-tdep.c: Include "linux-tdep.h".
+       * linux-thread-db.c (_initialize_thread_db): Declare before
+       definition.
+       * proc-service.c (_initialize_proc_service): Ditto.
+       * remote.c (remote_send_printf): Make it static.
+       * solib.c: Include "solib.h".
+       * symfile-mem.c (_initialize_symfile_mem): Declare before
+       definition.
+       * ada-lang.c (ada_la_decode, ada_match_name)
+       (ada_suppress_symbol_printing, ada_is_array_type)
+       (ada_value_ptr_subscript, ada_array_length)
+       (ada_to_static_fixed_value): Make them static.
+       (_initialize_ada_language): Declare before definition.
+       * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
+       (ada_task_list_changed, ada_new_objfile_observer): Make them
+       static.
+       (_initialize_tasks): Declare before definition.
+       * addrmap.c (_initialize_addrmap): Declare before definition.
+       * auxv.c (default_auxv_parse): Make it static.
+       * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
+       them static.
+       * breakpoint.c (remove_sal): Add line break.
+       (expand_line_sal_maybe): Make it static.
+       * cp-name-parser.y: Include "cp-support.h".
+       * cp-valprint.c (cp_find_class_member): Make it static.
+       * eval.c (value_f90_subarray): Ditto.
+       * exceptions.c (print_any_exception): Ditto.
+       * findcmd.c (_initialize_mem_search): Declare before definition.
+       * frame.c (frame_observer_target_changed): Make it static.
+       * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
+       * inf-child.c: Include "inf-child.h".
+       * inferior.h (valid_inferior_id): Rename to ...
+       (valid_gdb_inferior_id): ... this.
+       * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
+       Make them static.
+       * jv-lang.c (java_language_arch_info): Make it static.
+       * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
+       * osdata.c (info_osdata_command): Make it static.
+       * regcache.c (regcache_observer_target_changed): Make it static.
+       * reverse.c (_initialize_reverse): Declare before definition.
+       * stabsread.c (cleanup_undefined_types_noname)
+       (cleanup_undefined_types_1): Make them static.
+       * symfile.c (place_section): Make it static.
+       * symtab.c (find_pc_sect_psymtab_closer): Make it static.
+       * target-descriptions.c (_initialize_target_descriptions): Declare
+       before definition.
+       * target.c (default_get_ada_task_ptid, find_default_can_async_p)
+       (find_default_is_async_p, find_default_supports_non_stop): Make
+       them static.
+       (target_supports_non_stop): Add prototype.
+       (dummy_pid_to_str): Make it static.
+       * utils.c (_initialize_utils): Declare before definition.
+       * ada-exp.y (_initialize_ada_exp): Declare before definition.
+       * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
+       * target.h (struct target_ops): Add a prototype to the
+       to_can_execute_reverse callback.
+       * macroscope.c (_initialize_macroscope): Declare before definition. 
+       * cp-namespace.c (_initialize_cp_namespace): Declare before definition. 
+       * python/python.c (_initialize_python): Declare before definition.
+       * tui/tui-command.c: Include "tui/tui-command.h".
+       * tui/tui-data.c (init_content_element, init_win_info): Make them
+       static.
+       * tui/tui-disasm.c: Include "tui/tui-disasm.h".
+       * tui/tui-interp.c (_initialize_tui_interp): Declare before
+       definition.
+       * tui/tui-layout.c: Include "tui/tui-layout.h".
+       (_initialize_tui_layout): Declare before definition.
+       * tui/tui-regs.c: Include "tui/tui-regs.h".
+       (tui_display_reg_element_at_line): Make it static.
+       (_initialize_tui_regs): Declare before definition.
+       * tui/tui-stack.c (_initialize_tui_stack): Declare before
+       definition.
+       * tui/tui-win.c: Include "tui/tui-win.h".
+       (_initialize_tui_win): Declare before definition.
+       (tui_sigwinch_handler): Make it static.  Wrap in ifdef SIGWINCH.
+       * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
+       (tui_get_cmd_list): Add a prototype.
+       * tui/tui-windata.c: Include tui-windata.h.
+       * tui/tui-wingeneral.c (box_win): Make it static.
+       * cli/cli-logging.c (show_logging_command): Make it static.
+       (_initialize_cli_logging): Declare before definition.
+       * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
+       definition.
+
 2009-02-20  Pierre Muller  <muller@ics.u-strasbg.fr>
 
        * Extend use of i386_use_watchpoints to all i386 native files
index b71be36ad4ba9d2546681d7ec6a365d2f8b50ede..243b1524513b195f37a5342985bd0f7e8031b1a0 100644 (file)
@@ -1520,6 +1520,9 @@ type_system_address (void)
   return  type != NULL ? type : parse_type->builtin_data_ptr;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_ada_exp;
+
 void
 _initialize_ada_exp (void)
 {
index a6d5757164f0a447aea3745f77a8079e67a3c5b9..671cb35b21f0ea8701630570d57870f95c94b521 100644 (file)
@@ -1201,7 +1201,7 @@ ada_decode_symbol (const struct general_symbol_info *gsymbol)
   return *resultp;
 }
 
-char *
+static char *
 ada_la_decode (const char *encoded, int options)
 {
   return xstrdup (ada_decode (encoded));
@@ -1214,7 +1214,7 @@ ada_la_decode (const char *encoded, int options)
    suffix of SYM_NAME minus the same suffixes.  Also returns 0 if
    either argument is NULL.  */
 
-int
+static int
 ada_match_name (const char *sym_name, const char *name, int wild)
 {
   if (sym_name == NULL || name == NULL)
@@ -1235,7 +1235,7 @@ ada_match_name (const char *sym_name, const char *name, int wild)
 /* True (non-zero) iff, in Ada mode, the symbol SYM should be
    suppressed in info listings.  */
 
-int
+static int
 ada_suppress_symbol_printing (struct symbol *sym)
 {
   if (SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)
@@ -1570,7 +1570,7 @@ ada_is_direct_array_type (struct type *type)
 /* Non-zero iff TYPE represents any kind of array in Ada, or a pointer
  * to one. */
 
-int
+static int
 ada_is_array_type (struct type *type)
 {
   while (type != NULL 
@@ -2315,7 +2315,7 @@ ada_value_subscript (struct value *arr, int arity, struct value **ind)
    value of the element of *ARR at the ARITY indices given in
    IND.  Does not read the entire array into memory.  */
 
-struct value *
+static struct value *
 ada_value_ptr_subscript (struct value *arr, struct type *type, int arity,
                          struct value **ind)
 {
@@ -2574,7 +2574,7 @@ ada_array_bound (struct value *arr, int n, int which)
    Does not work for arrays indexed by enumeration types with representation
    clauses at the moment.  */
 
-struct value *
+static struct value *
 ada_array_length (struct value *arr, int n)
 {
   struct type *arr_type = ada_check_typedef (value_type (arr));
@@ -7532,7 +7532,7 @@ ada_to_fixed_value (struct value *val)
    without consulting any runtime values.  For Ada dynamic-sized
    types, therefore, the type of the result is likely to be inaccurate.  */
 
-struct value *
+static struct value *
 ada_to_static_fixed_value (struct value *val)
 {
   struct type *type =
@@ -11067,6 +11067,9 @@ const struct language_defn ada_language_defn = {
   LANG_MAGIC
 };
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_ada_language;
+
 void
 _initialize_ada_language (void)
 {
index 3639472abc36e9397fc437c3d3cb11fe88404cb8..61ed06e7e97da3d6de80822229aba720cbfae046 100644 (file)
@@ -154,7 +154,7 @@ static int stale_task_list_p = 1;
 /* Return the task number of the task whose ptid is PTID, or zero
    if the task could not be found.  */
 
-int
+static int
 ada_get_task_number (ptid_t ptid)
 {
   int i;
@@ -199,7 +199,7 @@ valid_task_id (int task_num)
 /* Return the task info associated to the Environment Task.
    This function assumes that the inferior does in fact use tasking.  */
 
-struct ada_task_info *
+static struct ada_task_info *
 ada_get_environment_task (void)
 {
   ada_build_task_list (0);
@@ -942,7 +942,7 @@ Task switching not supported when debugging from core files\n\
 
 /* Indicate that the task list may have changed, so invalidate the cache.  */
 
-void
+static void
 ada_task_list_changed (void)
 {
   stale_task_list_p = 1;  
@@ -960,7 +960,7 @@ ada_normal_stop_observer (struct bpstats *unused_args, int unused_args2)
 
 /* A routine to be called when the objfiles have changed.  */
 
-void
+static void
 ada_new_objfile_observer (struct objfile *objfile)
 {
   /* Invalidate all cached data that were extracted from an objfile.  */
@@ -973,6 +973,9 @@ ada_new_objfile_observer (struct objfile *objfile)
   ada_tasks_check_symbol_table = 1;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_tasks;
+
 void
 _initialize_tasks (void)
 {
index aa5afeb55b3c4f3b99e35cff1447a061c267a2f7..4b119f5d002fc2d447db16c3553f216d7994eb9d 100644 (file)
@@ -533,6 +533,9 @@ addrmap_create_mutable (struct obstack *obstack)
 \f
 /* Initialization.  */
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_addrmap;
+
 void
 _initialize_addrmap (void)
 {
index c78bc909f7ac43bf0487114c276b39dec440f8b5..f72842dbf623ac07cf7eb60c232dd11bb1dddc84 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "i386-tdep.h"
 #include "amd64-tdep.h"
+#include "amd64-nat.h"
 
 /* The following bits of code help with implementing debugging 32-bit
    code natively on AMD64.  The idea is to define two mappings between
index 2c42529685e40633bd63acd1e3ba556145e2f377..5007cd007db7d57b9e1c6a1b0d4431b246dbb9e6 100644 (file)
@@ -79,7 +79,7 @@ procfs_xfer_auxv (struct target_ops *ops,
    Return 0 if *READPTR is already at the end of the buffer.
    Return -1 if there is insufficient buffer for a whole entry.
    Return 1 if an entry was read into *TYPEP and *VALP.  */
-int
+static int
 default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
                   gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
 {
index aed669bbeef97485b828223ddcfc03f35a3de0e9..5ce9e19f3a0d9a2584a2e5789b72e83bb2e6403e 100644 (file)
@@ -66,7 +66,7 @@ build_target_sections_from_bfd (struct target_ops *targ, struct bfd *abfd)
   gdb_assert (cl.end - start <= count);
 }
 
-LONGEST
+static LONGEST
 target_bfd_xfer_partial (struct target_ops *ops,
                         enum target_object object,
                         const char *annex, gdb_byte *readbuf,
@@ -107,7 +107,7 @@ target_bfd_xfer_partial (struct target_ops *ops,
     }
 }
 
-void
+static void
 target_bfd_xclose (struct target_ops *t, int quitting)
 {
   bfd_close (t->to_data);
index 8a7057b03f42732ef596208bbdfd5cee123e9223..b63f0c4d6b7f9a865ba765479b23e3afdd5a7e3e 100644 (file)
@@ -5157,7 +5157,8 @@ create_breakpoint (struct symtabs_and_lines sals, char *addr_string,
 
 /* Remove element at INDEX_TO_REMOVE from SAL, shifting other
    elements to fill the void space.  */
-static void remove_sal (struct symtabs_and_lines *sal, int index_to_remove)
+static void
+remove_sal (struct symtabs_and_lines *sal, int index_to_remove)
 {
   int i = index_to_remove+1;
   int last_index = sal->nelts-1;
@@ -5182,7 +5183,7 @@ static void remove_sal (struct symtabs_and_lines *sal, int index_to_remove)
    line in all existing instantiations of 'foo'.
 
 */
-struct symtabs_and_lines
+static struct symtabs_and_lines
 expand_line_sal_maybe (struct symtab_and_line sal)
 {
   struct symtabs_and_lines expanded;
index 4e7b65577ba8ba046acce4b5c8a2fcf147d4a6d2..bafc913e3e19e6766e72d61cfc919cadfd162c67 100644 (file)
@@ -170,7 +170,7 @@ Usage: set logging on [FILENAME]\n\
        set logging redirect [on|off]\n"));
 }
 
-void
+static void
 show_logging_command (char *args, int from_tty)
 {
   if (saved_filename)
@@ -191,6 +191,9 @@ show_logging_command (char *args, int from_tty)
     printf_unfiltered (_("Output will be logged and displayed.\n"));
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_cli_logging;
+
 void
 _initialize_cli_logging (void)
 {
index 60a9a7ff1685b30d58d6ffa40f3637e4f7aa6af0..5f5ee3ac1d9c0a417df88093afad0109ec2df64a 100644 (file)
@@ -42,6 +42,7 @@ Boston, MA 02110-1301, USA.  */
 #include "safe-ctype.h"
 #include "libiberty.h"
 #include "demangle.h"
+#include "cp-support.h"
 
 /* Bison does not make it easy to create a parser without global
    state, unfortunately.  Here are all the global variables used
index b22f0311cc7df8d514dd8ce93fabb2dd67902331..c6c5617744437b19db733f27e99630879ebfc6b7 100644 (file)
@@ -811,6 +811,9 @@ maintenance_cplus_namespace (char *args, int from_tty)
     }
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_cp_namespace;
+
 void
 _initialize_cp_namespace (void)
 {
index 56aeaede9a4e89e40bc878149be95b51b326979c..8b7d868eab3baca5a346acfbe7edf957d4d4a05c 100644 (file)
@@ -502,7 +502,7 @@ cp_print_static_field (struct type *type,
    field number.  If OFFSET is not exactly at the start of some field, set
    *DOMAIN to NULL.  */
 
-void
+static void
 cp_find_class_member (struct type **domain_p, int *fieldno,
                      LONGEST offset)
 {
index 038334b5e49aa514ed2982f8745570cdd5a10a7d..1d3557135c3c3ec70dd3b79c7e0a4bd2f3a55d8e 100644 (file)
@@ -413,7 +413,7 @@ init_array_element (struct value *array, struct value *element,
   return index;
 }
 
-struct value *
+static struct value *
 value_f90_subarray (struct value *array,
                    struct expression *exp, int *pos, enum noside noside)
 {
index ed48e6d21c41b5fe3cb20008cd2870e7c0351f3b..4383ad38253a3c85f52229f623881fa9f99c2292 100644 (file)
@@ -356,7 +356,7 @@ exception_fprintf (struct ui_file *file, struct gdb_exception e,
     }
 }
 
-void
+static void
 print_any_exception (struct ui_file *file, const char *prefix,
                     struct gdb_exception e)
 {
index 4e7fa09f8f6185c6320fc162cb3243cf6186888d..7ae43e5dc5b86f39ff3428fff55cf89007e25d6e 100644 (file)
@@ -311,6 +311,9 @@ find_command (char *args, int from_tty)
   do_cleanups (old_cleanups);
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mem_search;
+
 void
 _initialize_mem_search (void)
 {
index 8cd87e119927c1bf63d97b0ad5872e7d2f316512..a1726bd543958b19b949bf10a4d319a0517594f4 100644 (file)
@@ -543,6 +543,9 @@ unset_exec_wrapper_command (char *args, int from_tty)
   exec_wrapper = NULL;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_fork_child;
+
 void
 _initialize_fork_child (void)
 {
index f0aefb56209fe2090c43f21f84db38b6e7484e89..dfd6b3d53c85c895f0e4e78d6fba670a682b8e25 100644 (file)
@@ -1145,7 +1145,7 @@ get_next_frame (struct frame_info *this_frame)
 
 /* Observer for the target_changed event.  */
 
-void
+static void
 frame_observer_target_changed (struct target_ops *target)
 {
   reinit_frame_cache ();
index 754fb2c8822b343973c975835fdee126dab1209f..ec1be44de852f482cb1d24670a40612a51144657 100644 (file)
@@ -511,6 +511,9 @@ gcore_memory_sections (bfd *obfd)
   return 1;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_gcore;
+
 void
 _initialize_gcore (void)
 {
index ea0a7a4eb7ed1c3ac309a502b78f991be4478b0e..3a52df3c4080d06fb489c2f42a3dca18e2ab1e6c 100644 (file)
@@ -482,7 +482,7 @@ gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr,
    which has virtual table index VOFFSET.  The method has an associated
    "this" adjustment of ADJUSTMENT bytes.  */
 
-const char *
+static const char *
 gnuv3_find_method_in (struct type *domain, CORE_ADDR voffset,
                      LONGEST adjustment)
 {
index 2e95c9bd2df8ab9510ed3e3d6d9c141e5f42852c..4171d1ef1a34ff31f98fb88f8e7a9e0e9e662e8b 100644 (file)
@@ -27,6 +27,7 @@
 #include "target.h"
 #include "inferior.h"
 #include "gdb_string.h"
+#include "inf-child.h"
 
 /* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
    for all registers.  */
index 06792007cdfc941b191ccc0c53e650759345be05..35f425c6cfc1ba35af2e14409e722c179284c7a0 100644 (file)
@@ -32,6 +32,7 @@
 #include "gdb_wait.h"
 #include <signal.h>
 
+#include "inf-ptrace.h"
 #include "inf-child.h"
 #include "gdbthread.h"
 
@@ -761,7 +762,7 @@ inf_ptrace_store_register (const struct regcache *regcache, int regnum)
 /* Store register REGNUM back into the inferior.  If REGNUM is -1, do
    this for all registers.  */
 
-void
+static void
 inf_ptrace_store_registers (struct regcache *regcache, int regnum)
 {
   if (regnum == -1)
index 5427677c5c02eab3afbc838d16d7efee8924dd73..c4594112d3487a8144adb26b046a789524534995 100644 (file)
@@ -479,7 +479,7 @@ extern int in_inferior_list (int pid);
 
 /* Boolean test for an already-known inferior id (GDB's homegrown id,
    not the system's).  */
-extern int valid_inferior_id (int num);
+extern int valid_gdb_inferior_id (int num);
 
 /* Search function to lookup a inferior by target 'pid'.  */
 extern struct inferior *find_inferior_pid (int pid);
index 2afc738010eac758e700602b9d3fa697cefff917..59fee8b9b3fa5eab5cc01eee6adb5b9be5676c88 100644 (file)
@@ -1660,7 +1660,7 @@ infrun_thread_stop_requested_callback (struct thread_info *info, void *arg)
    Cleanup local state that assumed the PTID was to be resumed, and
    report the stop to the frontend.  */
 
-void
+static void
 infrun_thread_stop_requested (ptid_t ptid)
 {
   struct displaced_step_request *it, *next, *prev = NULL;
@@ -4848,7 +4848,7 @@ static struct lval_funcs siginfo_value_funcs =
    the current thread.  Return a void value if there's no object
    available.  */
 
-struct value *
+static struct value *
 siginfo_make_value (struct internalvar *var)
 {
   struct type *type;
index 07288664b03b48697d74e144542697f4c3f59905..b702ebf27ee7776a00d3b4fa451d3747ff7db9d4 100644 (file)
@@ -1054,7 +1054,7 @@ enum java_primitive_types
   nr_java_primitive_types
 };
 
-void
+static void
 java_language_arch_info (struct gdbarch *gdbarch,
                         struct language_arch_info *lai)
 {
index adb763a6b2b46ffbdb411ff5c2d49f60c74ca2d3..4c91e4ff03aaa47d8b96587c1242058890a39bee 100644 (file)
@@ -4558,7 +4558,7 @@ linux_nat_terminal_inferior (void)
 
 /* target_terminal_ours implementation.  */
 
-void
+static void
 linux_nat_terminal_ours (void)
 {
   if (!target_is_async_p ())
@@ -4799,6 +4799,9 @@ linux_nat_setup_async (void)
   fcntl (linux_nat_event_pipe[1], F_SETFL, O_NONBLOCK);
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_linux_nat;
+
 void
 _initialize_linux_nat (void)
 {
index f1f73735e352b56d28e31555b560cc62bd0b47d3..e18e134ed361afc648f886087cdb83e6a8a3ab44 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "gdbtypes.h"
+#include "linux-tdep.h"
 
 /* This function is suitable for architectures that don't
    extend/override the standard siginfo structure.  */
index d3371d053a402070cdb934e77a9f5720bf87672c..68ec15779500633e78b2aabe8a289d0e86f69e83 100644 (file)
@@ -1175,6 +1175,9 @@ init_thread_db_ops (void)
   thread_db_ops.to_magic = OPS_MAGIC;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_thread_db;
+
 void
 _initialize_thread_db (void)
 {
index 0c7a0b41631d415a2d1238332ae4c0bef6233149..162ef9fbcdcc603d06175e47358dd2d054d9e12f 100644 (file)
@@ -371,7 +371,7 @@ m2_is_long_set (struct type *type)
                             This should be integrated into gdbtypes.c
                             inside get_discrete_bounds.  */
 
-int
+static int
 m2_get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
 {
   CHECK_TYPEDEF (type);
index c27785a9c99153abace4054cfcf3fd643092a970..18852611b02072e0b79f9be451149e54af3853ff 100644 (file)
@@ -151,6 +151,8 @@ standard_macro_lookup (const char *name, void *baton)
   return result;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_macroscope;
 
 void
 _initialize_macroscope (void)
index 5fafb1d8cceee34ff1ce9e52e4e7e05fce434842..45385270ace4a2a05fb591546d0e516c54f7418b 100644 (file)
@@ -42,6 +42,9 @@ async_reason_lookup (enum async_reply_reason reason)
   return async_reason_string_lookup[reason];
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_gdb_mi_common;
+
 void
 _initialize_gdb_mi_common (void)
 {
index 06506dddbafc64469ff98ad216e4acbc084d68bb..3d2c23c79f8263416adda102508326dc543e7c1d 100644 (file)
@@ -278,7 +278,7 @@ get_osdata_column (struct osdata_item *item, const char *name)
   return NULL;
 }
 
-void
+static void
 info_osdata_command (char *type, int from_tty)
 {
   struct osdata *osdata = NULL;
index a07c9a4e860d70078749c506cd676da3a8e8ec86..425afd9b0fb13331942ae9707fd85db132e6a0ce 100644 (file)
@@ -335,6 +335,9 @@ ps_getpid (gdb_ps_prochandle_t ph)
   return ph->pid;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_proc_service;
+
 void
 _initialize_proc_service (void)
 {
index 4f97416f2afb2e572223895f201db3ada2411ece..b3a27d6ed9c3a5522958ffbc0b6c3c64bd649260 100644 (file)
@@ -355,6 +355,9 @@ show_python (char *args, int from_tty)
 
 /* Initialize the Python code.  */
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_python;
+
 void
 _initialize_python (void)
 {
index 6366e11cb205f09bde526577306cff06b520b94a..2604d287f7cbd9088f6edf547c065895beb1e1b0 100644 (file)
@@ -447,7 +447,7 @@ struct regcache *get_current_regcache (void)
 
 /* Observer for the target_changed event.  */
 
-void
+static void
 regcache_observer_target_changed (struct target_ops *target)
 {
   registers_changed ();
index af2c10b7677eef83f12686408c0daadb7532f0f6..51a238cc233f19df90ac3d8e3b3f19e8b3b27d73 100644 (file)
@@ -5709,7 +5709,7 @@ remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len,
    FORMAT and the remaining arguments, then gets the reply.  Returns
    whether the packet was a success, a failure, or unknown.  */
 
-enum packet_result
+static enum packet_result
 remote_send_printf (const char *format, ...)
 {
   struct remote_state *rs = get_remote_state ();
index 63eb95d21957cb08d678109db7b08785b2d7d247..bbd3a6091841db15169a14dd3ee629dc512923f9 100644 (file)
@@ -103,6 +103,9 @@ reverse_finish (char *args, int from_tty)
   exec_reverse_once ("finish", args, from_tty);
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_reverse;
+
 void
 _initialize_reverse (void)
 {
index b437cee3cbf099f3f4bf83a50536b55f23cd4427..5970a7e4a7e036ba6a6855c3297d81a028944ad3 100644 (file)
@@ -149,7 +149,7 @@ LM_ADDR_FROM_LINK_MAP (struct so_list *so)
 }
 
 static int
-HAS_LM_DYNAMIC_FROM_LINK_MAP ()
+HAS_LM_DYNAMIC_FROM_LINK_MAP (void)
 {
   struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
 
index 5a282920a162f282869ab960340a31fd4aaf9820..f3e03a16ef09292e14cd1b9c8f611cef6250e321 100644 (file)
@@ -45,6 +45,7 @@
 #include "observer.h"
 #include "readline/readline.h"
 #include "remote.h"
+#include "solib.h"
 
 /* Architecture-specific operations.  */
 
index 3457784d12b0c265e5f4be2954464fae3a7a4ab4..2d7eb15a96a041519f2d2513691c2296550b1cd8 100644 (file)
@@ -4264,7 +4264,7 @@ add_undefined_type (struct type *type, int typenums[2])
 
 /* Try to fix all undefined types pushed on the UNDEF_TYPES vector.  */
 
-void
+static void
 cleanup_undefined_types_noname (void)
 {
   int i;
@@ -4299,7 +4299,7 @@ cleanup_undefined_types_noname (void)
    yet defined at the time a pointer to it was made.
    Fix:  Do a full lookup on the struct/union tag.  */
 
-void
+static void
 cleanup_undefined_types_1 (void)
 {
   struct type **type;
index 0a9c8d93c034f83cb9d9342e3824bb46a6ec1f4e..e336350f9f65c3c4ec4126fe3dd1061d97dacb33 100644 (file)
@@ -208,6 +208,10 @@ try using the \"file\" command first."));
 }
 
 \f
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_symfile_mem;
+
 void
 _initialize_symfile_mem (void)
 {
index 21328b89f22bbf0ead44962b41cef12112222934..6a0a8e510435d78714dbfe2566fe53161cc629ac 100644 (file)
@@ -480,7 +480,7 @@ struct place_section_arg
 /* Find a unique offset to use for loadable section SECT if
    the user did not provide an offset.  */
 
-void
+static void
 place_section (bfd *abfd, asection *sect, void *obj)
 {
   struct place_section_arg *arg = obj;
index 97d7950d7cb1e490b86a537eb733bc78edcff8f2..1ef92a8d9162a591172ea999dcf771c7e6fe769f 100644 (file)
@@ -770,7 +770,7 @@ matching_obj_sections (struct obj_section *obj_first,
 /* Find which partial symtab contains PC and SECTION starting at psymtab PST.
    We may find a different psymtab than PST.  See FIND_PC_SECT_PSYMTAB.  */
 
-struct partial_symtab *
+static struct partial_symtab *
 find_pc_sect_psymtab_closer (CORE_ADDR pc, struct obj_section *section,
                             struct partial_symtab *pst,
                             struct minimal_symbol *msymbol)
index 9ff66ddd949403f201e5c449166f139e5bf271e4..c1eec14542eb416771768e1e8ab2e312b5521492 100644 (file)
@@ -1125,6 +1125,9 @@ maint_print_c_tdesc_cmd (char *args, int from_tty)
   printf_unfiltered ("}\n");
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_target_descriptions;
+
 void
 _initialize_target_descriptions (void)
 {
index 937b26a560378e25f3a8e83f96befd136470b18e..fbff40c4f595fc77f8725cf93aa7a7ef4302f80d 100644 (file)
@@ -370,7 +370,7 @@ kill_or_be_killed (int from_tty)
    the PTID lwp and tid elements.  The pid used is the pid of the
    inferior_ptid.  */
 
-ptid_t
+static ptid_t
 default_get_ada_task_ptid (long lwp, long tid)
 {
   return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
@@ -2207,7 +2207,7 @@ find_default_create_inferior (struct target_ops *ops,
   return;
 }
 
-int
+static int
 find_default_can_async_p (void)
 {
   struct target_ops *t;
@@ -2222,7 +2222,7 @@ find_default_can_async_p (void)
   return 0;
 }
 
-int
+static int
 find_default_is_async_p (void)
 {
   struct target_ops *t;
@@ -2237,7 +2237,7 @@ find_default_is_async_p (void)
   return 0;
 }
 
-int
+static int
 find_default_supports_non_stop (void)
 {
   struct target_ops *t;
@@ -2249,7 +2249,7 @@ find_default_supports_non_stop (void)
 }
 
 int
-target_supports_non_stop ()
+target_supports_non_stop (void)
 {
   struct target_ops *t;
   for (t = &current_target; t != NULL; t = t->beneath)
@@ -2523,7 +2523,7 @@ normal_pid_to_str (ptid_t ptid)
   return buf;
 }
 
-char *
+static char *
 dummy_pid_to_str (struct target_ops *ops, ptid_t ptid)
 {
   return normal_pid_to_str (ptid);
index 916d8e949df99dec3a55954117043e7b0c2c7c85..c3d6c03ee5f0a2390908e7a94b560b3114bcd9d3 100644 (file)
@@ -538,7 +538,7 @@ struct target_ops
                             CORE_ADDR *found_addrp);
 
     /* Can target execute in reverse?  */
-    int (*to_can_execute_reverse) ();
+    int (*to_can_execute_reverse) (void);
 
     /* Does this target support debugging multiple processes
        simultaneously?  */
index 7ce04f3154922730ba80ab63d290f917c7a5218a..13afb65db70958726aa269d9b0982862572fa595 100644 (file)
@@ -26,6 +26,7 @@
 #include "tui/tui-data.h"
 #include "tui/tui-win.h"
 #include "tui/tui-io.h"
+#include "tui/tui-command.h"
 
 #include "gdb_curses.h"
 #include "gdb_string.h"
index 25190776dfbd1e0b4ab213ba5188970ba3a285fd..655a5d09b1f4b92fceba8249a48d2bf99044052c 100644 (file)
@@ -483,7 +483,7 @@ tui_init_generic_part (struct tui_gen_win_info *win)
 
 /* init_content_element().
  */
-void
+static void
 init_content_element (struct tui_win_element *element, 
                      enum tui_win_type type)
 {
@@ -532,7 +532,7 @@ init_content_element (struct tui_win_element *element,
     }
 }
 
-void
+static void
 init_win_info (struct tui_win_info *win_info)
 {
   tui_init_generic_part (&win_info->generic);
index c079087e17957e4daaa3ebb6d8e1583fe5cbf94a..14f0496c31158653e348075cc32142d2ebddd112 100644 (file)
@@ -35,6 +35,7 @@
 #include "tui/tui-winsource.h"
 #include "tui/tui-stack.h"
 #include "tui/tui-file.h"
+#include "tui/tui-disasm.h"
 
 #include "gdb_curses.h"
 
index bf38aae3e0e81ff1fc84d8cd9d89f1e65d153183..71f66560801a1b80644614c0734994f5e20fc95f 100644 (file)
@@ -190,6 +190,9 @@ tui_command_loop (void *data)
   return;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_tui_interp;
+
 void
 _initialize_tui_interp (void)
 {
index 3b6bb663fae0b3b343ef1dc26b64544e662252a1..09fd0c3e89b23add27e64d376f42a722dd1a35f8 100644 (file)
@@ -36,6 +36,7 @@
 #include "tui/tui-win.h"
 #include "tui/tui-winsource.h"
 #include "tui/tui-disasm.h"
+#include "tui/tui-layout.h"
 
 #include "gdb_string.h"
 #include "gdb_curses.h"
@@ -375,6 +376,10 @@ tui_default_win_viewport_height (enum tui_win_type type,
 
 /* Function to initialize gdb commands, for tui window layout
    manipulation.  */
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_tui_layout;
+
 void
 _initialize_tui_layout (void)
 {
index b74ad15cca46822998c9ce723e94b48b150c5f05..86a2457fc5ee49268de0afa38e99aede70d69749 100644 (file)
@@ -36,6 +36,7 @@
 #include "tui/tui-windata.h"
 #include "tui/tui-wingeneral.h"
 #include "tui/tui-file.h"
+#include "tui/tui-regs.h"
 #include "reggroups.h"
 #include "valprint.h"
 
@@ -416,7 +417,7 @@ tui_display_registers_from (int start_element_no)
    'start_element_no' on 'start_line_no' until the end of the register
    content or the end of the display height.  This function checks
    that we won't display off the end of the register display.  */
-void
+static void
 tui_display_reg_element_at_line (int start_element_no,
                                 int start_line_no)
 {
@@ -604,6 +605,9 @@ tui_reg_command (char *args, int from_tty)
   help_list (tuireglist, "tui reg ", -1, gdb_stdout);
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_tui_regs;
+
 void
 _initialize_tui_regs (void)
 {
index e95bd083ad9b8eb2b088edaba5e19194d7079915..ccc9b9ffdb2f4e5c4831247d051d0e71e7d1fb77 100644 (file)
@@ -411,6 +411,10 @@ tui_show_frame_info (struct frame_info *fi)
 
 /* Function to initialize gdb commands, for tui window stack
    manipulation.  */
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_tui_stack;
+
 void
 _initialize_tui_stack (void)
 {
index 5ec56b695752a7ee662829d2b90ab7ae38c40c8e..b101cdd5333e08860896b252270a8054dff6be31 100644 (file)
@@ -43,6 +43,7 @@
 #include "tui/tui-source.h"
 #include "tui/tui-winsource.h"
 #include "tui/tui-windata.h"
+#include "tui/tui-win.h"
 
 #include "gdb_curses.h"
 
@@ -348,6 +349,10 @@ tui_get_cmd_list (void)
 
 /* Function to initialize gdb commands, for tui window
    manipulation.  */
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_tui_win;
+
 void
 _initialize_tui_win (void)
 {
@@ -803,17 +808,18 @@ tui_resize_all (void)
     }
 }
 
-
+#ifdef SIGWINCH
 /* SIGWINCH signal handler for the tui.  This signal handler is always
    called, even when the readline package clears signals because it is
    set as the old_sigwinch() (TUI only).  */
-void
+static void
 tui_sigwinch_handler (int signal)
 {
   /* Say that a resize was done so that the readline can do it later
      when appropriate.  */
   tui_set_win_resized_to (TRUE);
 }
+#endif
 
 /* Initializes SIGWINCH signal handler for the tui.  */
 void
index 23630e6e18efc442fab37b06ebd5f9e0626644c1..34cefb4c191252071b0f1ba067c75bb9c272a216 100644 (file)
@@ -36,7 +36,6 @@ extern void tui_scroll (enum tui_scroll_direction,
 extern void tui_set_win_focus_to (struct tui_win_info *);
 extern void tui_resize_all (void);
 extern void tui_refresh_all_win (void);
-extern void tui_sigwinch_handler (int);
 
 extern chtype tui_border_ulcorner;
 extern chtype tui_border_urcorner;
@@ -55,6 +54,6 @@ extern void tui_initialize_win (void);
 extern void tui_update_gdb_sizes (void);
 
 /* Create or get the TUI command list.  */
-struct cmd_list_element **tui_get_cmd_list ();
+struct cmd_list_element **tui_get_cmd_list (void);
 
 #endif
index f15cb84370081ca1d5208d09692fc25c27716549..b852065973ceff06756aa16ebbbd7e3e800fbb83 100644 (file)
@@ -25,6 +25,7 @@
 #include "tui/tui-data.h"
 #include "tui/tui-wingeneral.h"
 #include "tui/tui-regs.h"
+#include "tui/tui-windata.h"
 
 #include "gdb_string.h"
 #include "gdb_curses.h"
index 6d6bdf58002971938883af1686f74385f30500d3..39b7118d2bdff54579c0e2eb63841784aef7845c 100644 (file)
@@ -77,7 +77,7 @@ tui_delete_win (WINDOW *window)
 
 
 /* Draw a border arround the window.  */
-void
+static void
 box_win (struct tui_gen_win_info *win_info, 
         int highlight_flag)
 {
index 6719ae1cd248d6bec1a2d7fb6f944001936168cd..92248391eedf49b3eb7711552ac14d4b92451ad0 100644 (file)
@@ -3541,6 +3541,9 @@ gdb_buildargv (const char *s)
   return argv;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_utils;
+
 void
 _initialize_utils (void)
 {
This page took 0.065564 seconds and 4 git commands to generate.