This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob] -Wmissing-prototypes step 1
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 08 Jun 2003 14:22:12 -0400
- Subject: [ob] -Wmissing-prototypes step 1
Hello,
This fixes a heap of -Wmissing-prototypes warnings and in doing so
identified two problems:
- function definitions that forgot to include the header file containing
the declarationc (doh!)
- non-static functions having no header declaration, instead the call
relies on an extern declaration in the calling .c file (outch!)
Given this, I think the warning is very useful.
Since this only cleans up the d10v-elf target, adding
-Wmissing-prototypes to the default warning list should probably wait a bit.
committed,
Andrew
2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
* aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
(rs6000_convert_from_func_ptr_addr): Make static.
(_initialize_rs6000_tdep): Add declaration.
* cli/cli-cmds.c (dont_repeat): Delete declaration.
(show_commands, set_verbose, show_history): Delete declaration.
* top.h (set_verbose): Add declaration.
(show_history, set_history, show_commands): Add declaration.
(do_restore_instream_cleanup): Add declaration.
* objc-lang.c (specialcmp): Make static.
(print_object_command): Make static.
(find_objc_msgsend): Make static.
(find_objc_msgcall_submethod_helper): Make static.
(find_objc_msgcall_submethod): Make static.
(_initialize_objc_language): Add declaration.
(find_implementation_from_class): Make static.
(find_implementation): Make static.
* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
* objc-lang.h (lookup_struct_typedef): Add declaration.
* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
* cli/cli-script.c (clear_hook_in_cleanup): Make static.
(do_restore_user_call_depth): Make static.
(do_restore_instream_cleanup): Delete declaration.
(dont_repeat): Delete declaration.
* cli/cli-decode.c (add_abbrev_cmd): Delete function.
* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
* reggroups.c (_initialize_reggroup): Add declaration.
* cp-support.c (_initialize_cp_support): Add declaration.
* cp-abi.c (_initialize_cp_abi): Add declaration.
* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
(_initialize_gnu_v3_abi): Add declaration.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
(_initialize_gnu_v2_abi): Add declaration.
* frame-base.c (_initialize_frame_base): Add declaration.
* doublest.c (floatformat_from_length): Make static.
* frame-unwind.c (_initialize_frame_unwind): Add declaration.
* frame.c (create_sentinel_frame): Make static.
(_initialize_frame): Add declaration.
* top.c (do_catch_errors): Make static.
(gdb_rl_operate_and_get_next_completion): Make static.
* typeprint.c: Include "typeprint.h".
* sentinel-frame.c (sentinel_frame_prev_register): Make static.
(sentinel_frame_this_id): Make static.
* p-valprint.c (_initialize_pascal_valprint): Add declaration.
* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
* dwarf2-frame.c (dwarf2_frame_cache): Make static.
* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
* maint.c (maintenance_print_architecture): Make static.
* signals/signals.c (_initialize_signals): Add declaration.
* std-regs.c (_initialize_frame_reg): Add declaration.
* jv-exp.y (push_variable): ISO C definition.
(push_qualified_expression_name): Ditto.
* memattr.c (_initialize_mem): Add declaration.
* remote.c (remote_check_watch_resources): Make static.
(remote_stopped_by_watchpoint): Make static.
(remote_stopped_data_address): Make static.
* d10v-tdep.c (nr_dmap_regs): Make static.
(a0_regnum): Make static.
(d10v_frame_unwind_cache): Make static.
(d10v_frame_p): Make static.
* osabi.c (show_osabi): Make static.
(_initialize_gdb_osabi): Add extern declaration.
* gdbtypes.c (make_qualified_type): Make static.
(safe_parse_type): Make static.
* macrocmd.c (_initialize_macrocmd): Add extern declaration.
* macrotab.c (macro_bcache_free): Make static.
* interps.c (interp_set_quiet): Make static.
(interpreter_exec_cmd): Make static.
* stack.h (select_frame_command): New file.
* stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete function.
(select_frame_command): Make global.
* infcall.c: Include "infcall.h".
* linespec.c: Include "linespec.h".
* symfile.c (sections_overlap): Make static.
* cp-support.h (cp_initialize_namespace): ISO C declaration.
* charset.c (_initialize_charset): Add missing prototype.
* regcache.c (init_legacy_regcache_descr): Make static.
(do_regcache_xfree): Make static.
(regcache_xfer_part): Make static.
(_initialize_regcache): Add missing prototype.
* breakpoint.c (parse_breakpoint_sals): Make static.
(breakpoint_sals_to_pc): Make static.
* interps.h (clear_interpreter_hooks): ISO C declaration.
* Makefile.in (stack_h): Define.
(stack.o, typeprint.o, mi-main.o): Update dependencies.
(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
Index: mi/ChangeLog
2003-06-08 Andrew Cagney <cagney@redhat.com>
* mi-parse.c (_initialize_mi_parse): Delete function.
* mi-main.c: Include "mi-main.h".
* mi-interp.c (_initialize_mi_interp): Add declaration.
* mi-cmd-stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete extern declaration.
(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
with select_frame_command.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.393
diff -u -r1.393 Makefile.in
--- Makefile.in 8 Jun 2003 16:09:44 -0000 1.393
+++ Makefile.in 8 Jun 2003 18:03:12 -0000
@@ -726,6 +726,7 @@
sparcnbsd_tdep_h = sparcnbsd-tdep.h
srec_h = srec.h
stabsread_h = stabsread.h
+stack_h = stack.h
symfile_h = symfile.h
symtab_h = symtab.h
target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
@@ -1900,8 +1901,8 @@
lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
$(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
- $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \
- $(cp_abi_h) $(source_h) $(parser_defs_h) $(block_h) $(objc_lang_h)
+ $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
+ $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) $(objc_lang_h)
linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
$(cli_decode_h) $(gdb_string_h)
@@ -2263,8 +2264,8 @@
$(doublest_h) $(stabsread_h) $(cp_abi_h) $(cp_support_h)
stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
- $(gdbcore_h) $(target_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \
- $(annotate_h) $(ui_out_h) $(source_h) $(block_h)
+ $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \
+ $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h)
standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \
$(inferior_h) $(gdb_wait_h)
std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
@@ -2316,7 +2317,8 @@
trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) $(regcache_h)
typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
- $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
+ $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \
+ $(gdb_string_h)
ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
$(ui_out_h) $(gdb_assert_h)
@@ -2592,7 +2594,7 @@
$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
- $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h)
+ $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) $(stack_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)
Index: acinclude.m4
===================================================================
RCS file: /cvs/src/src/gdb/acinclude.m4,v
retrieving revision 1.8
diff -u -r1.8 acinclude.m4
--- acinclude.m4 11 Feb 2003 16:11:16 -0000 1.8
+++ acinclude.m4 8 Jun 2003 18:03:13 -0000
@@ -943,3 +943,56 @@
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
+dnl See whether we need a declaration for a function.
+dnl The result is highly dependent on the INCLUDES passed in, so make sure
+dnl to use a different cache variable name in this macro if it is invoked
+dnl in a different context somewhere else.
+dnl gcc_AC_CHECK_DECL(SYMBOL,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECL,
+[AC_MSG_CHECKING([whether $1 is declared])
+AC_CACHE_VAL(gcc_cv_have_decl_$1,
+[AC_TRY_COMPILE([$4],
+[#ifndef $1
+char *(*pfn) = (char *(*)) $1 ;
+#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
+dnl gcc_AC_CHECK_DECLS(SYMBOLS,
+dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECLS,
+[for ac_func in $1
+do
+changequote(, )dnl
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+gcc_AC_CHECK_DECL($ac_func,
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
+dnl It is possible that the include files passed in here are local headers
+dnl which supply a backup declaration for the relevant prototype based on
+dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
+dnl will always return success. E.g. see libiberty.h's handling of
+dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
+dnl 1 so that any local headers used do not provide their own prototype
+dnl during this test.
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $4
+)
+done
+dnl Automatically generate config.h entries via autoheader.
+if test x = y ; then
+ patsubst(translit([$1], [a-z], [A-Z]), [\w+],
+ [AC_DEFINE([HAVE_DECL_\&], 1,
+ [Define to 1 if we found this declaration otherwise define to 0.])])dnl
+fi
+])
+
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.121
diff -u -r1.121 breakpoint.c
--- breakpoint.c 2 Jun 2003 04:16:23 -0000 1.121
+++ breakpoint.c 8 Jun 2003 18:03:20 -0000
@@ -4607,7 +4607,7 @@
addresses found. ADDR_STRING contains a vector of (canonical)
address strings. ARG points to the end of the SAL. */
-void
+static void
parse_breakpoint_sals (char **address,
struct symtabs_and_lines *sals,
char ***addr_string)
@@ -4674,7 +4674,7 @@
/* Convert each SAL into a real PC. Verify that the PC can be
inserted as a breakpoint. If it can't throw an error. */
-void
+static void
breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
char *address)
{
Index: charset.c
===================================================================
RCS file: /cvs/src/src/gdb/charset.c,v
retrieving revision 1.4
diff -u -r1.4 charset.c
--- charset.c 2 May 2003 14:23:38 -0000 1.4
+++ charset.c 8 Jun 2003 18:03:20 -0000
@@ -1163,6 +1163,7 @@
/* The charset.c module initialization function. */
+extern initialize_file_ftype _initialize_charset; /* -Wmissing-prototype */
void
_initialize_charset (void)
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.127
diff -u -r1.127 configure.in
--- configure.in 4 Jun 2003 20:51:27 -0000 1.127
+++ configure.in 8 Jun 2003 18:03:31 -0000
@@ -357,6 +357,12 @@
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
+# ------------------------- #
+# Checks for declarations. #
+# ------------------------- #
+
+gcc_AC_CHECK_DECLS(getopt)
+
# ------------------ #
# Checks for types. #
# ------------------ #
Index: cp-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-abi.c,v
retrieving revision 1.5
diff -u -r1.5 cp-abi.c
--- cp-abi.c 5 Mar 2003 18:01:46 -0000 1.5
+++ cp-abi.c 8 Jun 2003 18:03:31 -0000
@@ -234,6 +234,8 @@
ui_out_text (uiout, ").\n");
}
+extern initialize_file_ftype _initialize_cp_abi; /* -Wmissing-prototypes */
+
void
_initialize_cp_abi (void)
{
Index: cp-support.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-support.c,v
retrieving revision 1.3
diff -u -r1.3 cp-support.c
--- cp-support.c 23 Apr 2003 23:45:23 -0000 1.3
+++ cp-support.c 8 Jun 2003 18:03:31 -0000
@@ -349,6 +349,8 @@
printf_unfiltered ("%s\n", prefix);
}
+extern initialize_file_ftype _initialize_cp_support; /* -Wmissing-prototypes */
+
void
_initialize_cp_support (void)
{
Index: cp-support.h
===================================================================
RCS file: /cvs/src/src/gdb/cp-support.h,v
retrieving revision 1.4
diff -u -r1.4 cp-support.h
--- cp-support.h 2 Jun 2003 04:16:24 -0000 1.4
+++ cp-support.h 8 Jun 2003 18:03:31 -0000
@@ -71,7 +71,7 @@
unsigned int outer_length,
unsigned int inner_length);
-extern void cp_initialize_namespace ();
+extern void cp_initialize_namespace (void);
extern void cp_finalize_namespace (struct block *static_block,
struct obstack *obstack);
Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.120
diff -u -r1.120 d10v-tdep.c
--- d10v-tdep.c 8 Jun 2003 16:09:45 -0000 1.120
+++ d10v-tdep.c 8 Jun 2003 18:03:37 -0000
@@ -86,13 +86,13 @@
RET1_REGNUM = R0_REGNUM,
};
-int
+static int
nr_dmap_regs (struct gdbarch *gdbarch)
{
return gdbarch_tdep (gdbarch)->nr_dmap_regs;
}
-int
+static int
a0_regnum (struct gdbarch *gdbarch)
{
return gdbarch_tdep (gdbarch)->a0_regnum;
@@ -661,7 +661,7 @@
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-struct d10v_unwind_cache *
+static struct d10v_unwind_cache *
d10v_frame_unwind_cache (struct frame_info *next_frame,
void **this_prologue_cache)
{
@@ -1448,7 +1448,7 @@
d10v_frame_prev_register
};
-const struct frame_unwind *
+static const struct frame_unwind *
d10v_frame_p (CORE_ADDR pc)
{
return &d10v_frame_unwind;
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.123
diff -u -r1.123 defs.h
--- defs.h 2 Jun 2003 02:09:39 -0000 1.123
+++ defs.h 8 Jun 2003 18:03:38 -0000
@@ -881,6 +881,9 @@
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
+/* Initialize the error buffer. */
+extern void error_init (void);
+
/* Returns a freshly allocate buffer containing the last error
message. */
extern char *error_last_message (void);
Index: doublest.c
===================================================================
RCS file: /cvs/src/src/gdb/doublest.c,v
retrieving revision 1.14
diff -u -r1.14 doublest.c
--- doublest.c 9 Apr 2003 15:08:26 -0000 1.14
+++ doublest.c 8 Jun 2003 18:03:40 -0000
@@ -625,7 +625,7 @@
target-dependent code, the format of floating-point types is known,
but not passed on by GDB. This should be fixed. */
-const struct floatformat *
+static const struct floatformat *
floatformat_from_length (int len)
{
if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.6
diff -u -r1.6 dwarf2-frame.c
--- dwarf2-frame.c 7 Jun 2003 19:05:51 -0000 1.6
+++ dwarf2-frame.c 8 Jun 2003 18:03:40 -0000
@@ -455,7 +455,7 @@
struct dwarf2_frame_state_reg *reg;
};
-struct dwarf2_frame_cache *
+static struct dwarf2_frame_cache *
dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
{
struct cleanup *old_chain;
Index: dwarf2expr.h
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2expr.h,v
retrieving revision 1.4
diff -u -r1.4 dwarf2expr.h
--- dwarf2expr.h 13 Apr 2003 15:53:44 -0000 1.4
+++ dwarf2expr.h 8 Jun 2003 18:03:40 -0000
@@ -76,7 +76,7 @@
int in_reg;
};
-struct dwarf_expr_context *new_dwarf_expr_context ();
+struct dwarf_expr_context *new_dwarf_expr_context (void);
void free_dwarf_expr_context (struct dwarf_expr_context *ctx);
void dwarf_expr_push (struct dwarf_expr_context *ctx, CORE_ADDR value);
Index: frame-base.c
===================================================================
RCS file: /cvs/src/src/gdb/frame-base.c,v
retrieving revision 1.1
diff -u -r1.1 frame-base.c
--- frame-base.c 1 Apr 2003 19:11:01 -0000 1.1
+++ frame-base.c 8 Jun 2003 18:03:40 -0000
@@ -146,6 +146,8 @@
return table->default_base;
}
+extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-protypes */
+
void
_initialize_frame_base (void)
{
Index: frame-unwind.c
===================================================================
RCS file: /cvs/src/src/gdb/frame-unwind.c,v
retrieving revision 1.3
diff -u -r1.3 frame-unwind.c
--- frame-unwind.c 17 Mar 2003 14:23:49 -0000 1.3
+++ frame-unwind.c 8 Jun 2003 18:03:40 -0000
@@ -98,6 +98,8 @@
return legacy_saved_regs_unwind;
}
+extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
+
void
_initialize_frame_unwind (void)
{
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.117
diff -u -r1.117 frame.c
--- frame.c 3 Jun 2003 18:53:37 -0000 1.117
+++ frame.c 8 Jun 2003 18:03:46 -0000
@@ -778,7 +778,7 @@
/* Create a sentinel frame. */
-struct frame_info *
+static struct frame_info *
create_sentinel_frame (struct regcache *regcache)
{
struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
@@ -2260,6 +2260,8 @@
|| !gdbarch_unwind_dummy_id_p (current_gdbarch)
|| !SAVE_DUMMY_FRAME_TOS_P ());
}
+
+extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
void
_initialize_frame (void)
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.72
diff -u -r1.72 gdbtypes.c
--- gdbtypes.c 14 May 2003 17:43:17 -0000 1.72
+++ gdbtypes.c 8 Jun 2003 18:03:49 -0000
@@ -434,7 +434,7 @@
/* Create a new type with instance flags NEW_FLAGS, based on TYPE.
If STORAGE is non-NULL, create the new type instance there. */
-struct type *
+static struct type *
make_qualified_type (struct type *type, int new_flags,
struct type *storage)
{
@@ -1668,7 +1668,7 @@
/* Parse a type expression in the string [P..P+LENGTH). If an error occurs,
silently return builtin_type_void. */
-struct type *
+static struct type *
safe_parse_type (char *p, int length)
{
struct ui_file *saved_gdb_stderr;
Index: gnu-v2-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v2-abi.c,v
retrieving revision 1.11
diff -u -r1.11 gnu-v2-abi.c
--- gnu-v2-abi.c 5 Mar 2003 18:01:46 -0000 1.11
+++ gnu-v2-abi.c 8 Jun 2003 18:03:52 -0000
@@ -184,7 +184,7 @@
}
-struct type *
+static struct type *
gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
{
struct type *known_type;
@@ -400,6 +400,8 @@
gnu_v2_abi_ops.rtti_type = gnuv2_value_rtti_type;
gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
}
+
+extern initialize_file_ftype _initialize_gnu_v2_abi; /* -Wmissing-prototypes */
void
_initialize_gnu_v2_abi (void)
Index: gnu-v3-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v3-abi.c,v
retrieving revision 1.16
diff -u -r1.16 gnu-v3-abi.c
--- gnu-v3-abi.c 14 May 2003 17:43:17 -0000 1.16
+++ gnu-v3-abi.c 8 Jun 2003 18:03:52 -0000
@@ -372,7 +372,7 @@
to (the address of)(ARG) + OFFSET.
-1 is returned on error. */
-int
+static int
gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
CORE_ADDR address)
{
@@ -447,6 +447,7 @@
gnu_v3_abi_ops.baseclass_offset = gnuv3_baseclass_offset;
}
+extern initialize_file_ftype _initialize_gnu_v3_abi; /* -Wmissing-prototypes */
void
_initialize_gnu_v3_abi (void)
Index: hpacc-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/hpacc-abi.c,v
retrieving revision 1.4
diff -u -r1.4 hpacc-abi.c
--- hpacc-abi.c 5 Mar 2003 18:01:46 -0000 1.4
+++ hpacc-abi.c 8 Jun 2003 18:03:52 -0000
@@ -309,6 +309,7 @@
hpacc_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
}
+extern initialize_file_ftype _initialize_hpacc_abi; /* -Wmissing-prototypes */
void
_initialize_hpacc_abi (void)
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.14
diff -u -r1.14 infcall.c
--- infcall.c 1 Jun 2003 22:30:30 -0000 1.14
+++ infcall.c 8 Jun 2003 18:03:53 -0000
@@ -34,6 +34,7 @@
#include "gdbcmd.h"
#include "command.h"
#include "gdb_string.h"
+#include "infcall.h"
/* NOTE: cagney/2003-04-16: What's the future of this code?
Index: interps.c
===================================================================
RCS file: /cvs/src/src/gdb/interps.c,v
retrieving revision 1.4
diff -u -r1.4 interps.c
--- interps.c 12 Feb 2003 15:31:30 -0000 1.4
+++ interps.c 8 Jun 2003 18:03:53 -0000
@@ -290,7 +290,7 @@
return current_interpreter->quiet_p;
}
-int
+static int
interp_set_quiet (struct interp *interp, int quiet)
{
int old_val = interp->quiet_p;
@@ -357,7 +357,7 @@
/* Don't know if anything needs to be done here... */
}
-void
+static void
interpreter_exec_cmd (char *args, int from_tty)
{
struct interp *old_interp, *interp_to_use;
Index: interps.h
===================================================================
RCS file: /cvs/src/src/gdb/interps.h,v
retrieving revision 1.3
diff -u -r1.3 interps.h
--- interps.h 12 Feb 2003 15:23:20 -0000 1.3
+++ interps.h 8 Jun 2003 18:03:53 -0000
@@ -63,7 +63,7 @@
extern int current_interp_display_prompt_p (void);
extern void current_interp_command_loop (void);
-extern void clear_interpreter_hooks ();
+extern void clear_interpreter_hooks (void);
/* well-known interpreters */
#define INTERP_CONSOLE "console"
Index: jv-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/jv-exp.y,v
retrieving revision 1.14
diff -u -r1.14 jv-exp.y
--- jv-exp.y 14 May 2003 17:43:18 -0000 1.14
+++ jv-exp.y 8 Jun 2003 18:03:56 -0000
@@ -1228,9 +1228,7 @@
Otherwise, return 0. */
static int
-push_variable (name)
- struct stoken name;
-
+push_variable (struct stoken name)
{
char *tmp = copy_name (name);
int is_a_field_of_this = 0;
@@ -1302,9 +1300,7 @@
Handle a qualified name, where DOT_INDEX is the index of the first '.' */
static void
-push_qualified_expression_name (name, dot_index)
- struct stoken name;
- int dot_index;
+push_qualified_expression_name (struct stoken name, int dot_index)
{
struct stoken token;
char *tmp;
Index: linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.48
diff -u -r1.48 linespec.c
--- linespec.c 3 Jun 2003 02:56:04 -0000 1.48
+++ linespec.c 8 Jun 2003 18:03:57 -0000
@@ -34,6 +34,7 @@
#include "parser-defs.h"
#include "block.h"
#include "objc-lang.h"
+#include "linespec.h"
/* We share this one with symtab.c, but it is not exported widely. */
Index: macrocmd.c
===================================================================
RCS file: /cvs/src/src/gdb/macrocmd.c,v
retrieving revision 1.4
diff -u -r1.4 macrocmd.c
--- macrocmd.c 17 Jul 2002 21:16:33 -0000 1.4
+++ macrocmd.c 8 Jun 2003 18:03:57 -0000
@@ -222,6 +222,8 @@
/* Initializing the `macrocmd' module. */
+extern initialize_file_ftype _initialize_macrocmd;
+
void
_initialize_macrocmd (void)
{
Index: macrotab.c
===================================================================
RCS file: /cvs/src/src/gdb/macrotab.c,v
retrieving revision 1.7
diff -u -r1.7 macrotab.c
--- macrotab.c 17 Dec 2002 00:39:07 -0000 1.7
+++ macrotab.c 8 Jun 2003 18:03:57 -0000
@@ -123,7 +123,7 @@
/* Free a possibly bcached object OBJ. That is, if the macro table T
has a bcache, it's an error; otherwise, xfree OBJ. */
-void
+static void
macro_bcache_free (struct macro_table *t, void *obj)
{
gdb_assert (! t->bcache);
Index: main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.33
diff -u -r1.33 main.c
--- main.c 2 Jun 2003 16:02:58 -0000 1.33
+++ main.c 8 Jun 2003 18:03:59 -0000
@@ -74,10 +74,6 @@
struct ui_file *gdb_stdlog;
struct ui_file *gdb_stdtarg;
-/* Used to initialize error() - defined in utils.c */
-
-extern void error_init (void);
-
/* Whether to enable writing into executable and core files */
extern int write_files;
Index: maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.38
diff -u -r1.38 maint.c
--- maint.c 7 May 2003 21:42:47 -0000 1.38
+++ maint.c 8 Jun 2003 18:03:59 -0000
@@ -407,7 +407,7 @@
print_symbol_bcache_statistics ();
}
-void
+static void
maintenance_print_architecture (char *args, int from_tty)
{
if (args == NULL)
Index: memattr.c
===================================================================
RCS file: /cvs/src/src/gdb/memattr.c,v
retrieving revision 1.14
diff -u -r1.14 memattr.c
--- memattr.c 9 Aug 2002 22:50:31 -0000 1.14
+++ memattr.c 8 Jun 2003 18:04:01 -0000
@@ -514,6 +514,8 @@
dont_repeat ();
}
+extern initialize_file_ftype _initialize_mem; /* -Wmissing-prototype */
+
void
_initialize_mem (void)
{
Index: objc-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/objc-exp.y,v
retrieving revision 1.12
diff -u -r1.12 objc-exp.y
--- objc-exp.y 14 May 2003 17:43:18 -0000 1.12
+++ objc-exp.y 8 Jun 2003 18:04:05 -0000
@@ -1775,7 +1775,6 @@
CORE_ADDR Class = lookup_objc_class(tmp);
if (Class)
{
- extern struct symbol *lookup_struct_typedef();
yylval.class.class = Class;
if ((sym = lookup_struct_typedef (tmp,
expression_context_block,
Index: objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.27
diff -u -r1.27 objc-lang.c
--- objc-lang.c 8 Jun 2003 02:31:24 -0000 1.27
+++ objc-lang.c 8 Jun 2003 18:04:05 -0000
@@ -775,7 +775,8 @@
* Used for qsorting lists of objc methods (either by class or selector).
*/
-int specialcmp(char *a, char *b)
+static int
+specialcmp (char *a, char *b)
{
while (*a && *a != ' ' && *a != ']' && *b && *b != ' ' && *b != ']')
{
@@ -1518,7 +1519,7 @@
return method + (tmp - buf);
}
-void
+static void
print_object_command (char *args, int from_tty)
{
struct value *object, *function, *description;
@@ -1606,7 +1607,7 @@
* case the functions have moved for some reason.
*/
-void
+static void
find_objc_msgsend (void)
{
unsigned int i;
@@ -1653,7 +1654,7 @@
CORE_ADDR *new_pc;
};
-int
+static int
find_objc_msgcall_submethod_helper (void * arg)
{
struct objc_submethod_helper_data *s =
@@ -1665,7 +1666,7 @@
return 0;
}
-int
+static int
find_objc_msgcall_submethod (int (*f) (CORE_ADDR, CORE_ADDR *),
CORE_ADDR pc,
CORE_ADDR *new_pc)
@@ -1709,6 +1710,8 @@
return 0;
}
+extern initialize_file_ftype _initialize_objc_language;
+
void
_initialize_objc_language (void)
{
@@ -1772,7 +1775,7 @@
class->protocols = read_memory_unsigned_integer (addr + 36, 4);
}
-CORE_ADDR
+static CORE_ADDR
find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
{
CORE_ADDR subclass = class;
@@ -1822,7 +1825,7 @@
return 0;
}
-CORE_ADDR
+static CORE_ADDR
find_implementation (CORE_ADDR object, CORE_ADDR sel)
{
struct objc_object ostr;
Index: objc-lang.h
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.h,v
retrieving revision 1.9
diff -u -r1.9 objc-lang.h
--- objc-lang.h 2 Apr 2003 03:02:46 -0000 1.9
+++ objc-lang.h 8 Jun 2003 18:04:05 -0000
@@ -62,4 +62,7 @@
extern void add_msglist (struct stoken *str, int addcolon);
extern int end_msglist (void);
+struct symbol *lookup_struct_typedef (char *name, struct block *block,
+ int noerr);
+
#endif
Index: osabi.c
===================================================================
RCS file: /cvs/src/src/gdb/osabi.c,v
retrieving revision 1.14
diff -u -r1.14 osabi.c
--- osabi.c 21 Mar 2003 10:07:17 -0000 1.14
+++ osabi.c 8 Jun 2003 18:04:05 -0000
@@ -531,7 +531,7 @@
internal_error (__FILE__, __LINE__, "Updating OS ABI failed.");
}
-void
+static void
show_osabi (char *args, int from_tty)
{
if (user_osabi_state == osabi_auto)
@@ -546,6 +546,8 @@
gdbarch_osabi_name (GDB_OSABI_DEFAULT));
}
+extern initialize_file_ftype _initialize_gdb_osabi; /* -Wmissing-prototype */
+
void
_initialize_gdb_osabi (void)
{
Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.23
diff -u -r1.23 p-exp.y
--- p-exp.y 14 May 2003 17:43:18 -0000 1.23
+++ p-exp.y 8 Jun 2003 18:04:11 -0000
@@ -158,8 +158,8 @@
static struct type *current_type;
-static void push_current_type ();
-static void pop_current_type ();
+static void push_current_type (void);
+static void pop_current_type (void);
static int search_field;
%}
@@ -992,7 +992,8 @@
static struct type_push *tp_top = NULL;
-static void push_current_type ()
+static void
+push_current_type (void)
{
struct type_push *tpnew;
tpnew = (struct type_push *) malloc (sizeof (struct type_push));
@@ -1002,7 +1003,8 @@
tp_top = tpnew;
}
-static void pop_current_type ()
+static void
+pop_current_type (void)
{
struct type_push *tp = tp_top;
if (tp)
Index: p-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-valprint.c,v
retrieving revision 1.20
diff -u -r1.20 p-valprint.c
--- p-valprint.c 2 Jun 2003 18:08:16 -0000 1.20
+++ p-valprint.c 8 Jun 2003 18:04:14 -0000
@@ -1097,6 +1097,7 @@
fprintf_filtered (stream, "%ld", (long int) (val >> 3));
}
+extern initialize_file_ftype _initialize_pascal_valprint; /* -Wmissing-prototypes */
void
_initialize_pascal_valprint (void)
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.85
diff -u -r1.85 regcache.c
--- regcache.c 7 Jun 2003 22:38:55 -0000 1.85
+++ regcache.c 8 Jun 2003 18:04:15 -0000
@@ -82,7 +82,7 @@
struct type **register_type;
};
-void
+static void
init_legacy_regcache_descr (struct gdbarch *gdbarch,
struct regcache_descr *descr)
{
@@ -340,7 +340,7 @@
xfree (regcache);
}
-void
+static void
do_regcache_xfree (void *data)
{
regcache_xfree (data);
@@ -1064,7 +1064,7 @@
typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum,
const void *buf);
-void
+static void
regcache_xfer_part (struct regcache *regcache, int regnum,
int offset, int len, void *in, const void *out,
regcache_read_ftype *read, regcache_write_ftype *write)
@@ -1663,6 +1663,8 @@
{
regcache_print (args, regcache_dump_groups);
}
+
+extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
void
_initialize_regcache (void)
Index: reggroups.c
===================================================================
RCS file: /cvs/src/src/gdb/reggroups.c,v
retrieving revision 1.3
diff -u -r1.3 reggroups.c
--- reggroups.c 13 Apr 2003 22:34:27 -0000 1.3
+++ reggroups.c 8 Jun 2003 18:04:16 -0000
@@ -245,6 +245,8 @@
struct reggroup *const save_reggroup = &save_group;
struct reggroup *const restore_reggroup = &restore_group;
+extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
+
void
_initialize_reggroup (void)
{
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.102
diff -u -r1.102 remote.c
--- remote.c 6 Jun 2003 23:32:59 -0000 1.102
+++ remote.c 8 Jun 2003 18:04:51 -0000
@@ -4854,7 +4854,7 @@
int remote_hw_watchpoint_limit = -1;
int remote_hw_breakpoint_limit = -1;
-int
+static int
remote_check_watch_resources (int type, int cnt, int ot)
{
if (type == bp_hardware_breakpoint)
@@ -4880,13 +4880,13 @@
return -1;
}
-int
+static int
remote_stopped_by_watchpoint (void)
{
return remote_stopped_by_watchpoint_p;
}
-CORE_ADDR
+static CORE_ADDR
remote_stopped_data_address (void)
{
if (remote_stopped_by_watchpoint ())
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.139
diff -u -r1.139 rs6000-tdep.c
--- rs6000-tdep.c 7 Jun 2003 22:38:55 -0000 1.139
+++ rs6000-tdep.c 8 Jun 2003 18:04:52 -0000
@@ -231,7 +231,7 @@
}
/* Get the ith function argument for the current function. */
-CORE_ADDR
+static CORE_ADDR
rs6000_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type)
{
@@ -2164,7 +2164,7 @@
/* Return real function address if ADDR (a function pointer) is in the data
space and is therefore a special function pointer. */
-CORE_ADDR
+static CORE_ADDR
rs6000_convert_from_func_ptr_addr (CORE_ADDR addr)
{
struct obj_section *s;
@@ -3032,6 +3032,8 @@
}
/* Initialization code. */
+
+extern initialize_file_ftype _initialize_rs6000_tdep; /* -Wmissing-protypes */
void
_initialize_rs6000_tdep (void)
Index: sentinel-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/sentinel-frame.c,v
retrieving revision 1.7
diff -u -r1.7 sentinel-frame.c
--- sentinel-frame.c 4 May 2003 17:34:51 -0000 1.7
+++ sentinel-frame.c 8 Jun 2003 18:04:52 -0000
@@ -44,7 +44,7 @@
/* Here the register value is taken direct from the register cache. */
-void
+static void
sentinel_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache,
int regnum, int *optimized,
@@ -70,7 +70,7 @@
}
}
-void
+static void
sentinel_frame_this_id (struct frame_info *next_frame,
void **this_prologue_cache,
struct frame_id *this_id)
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.77
diff -u -r1.77 stack.c
--- stack.c 22 May 2003 18:37:05 -0000 1.77
+++ stack.c 8 Jun 2003 18:05:02 -0000
@@ -40,6 +40,7 @@
#include "annotate.h"
#include "ui-out.h"
#include "block.h"
+#include "stack.h"
/* Prototypes for exported functions. */
@@ -71,8 +72,6 @@
static void current_frame_command (char *, int);
-static void select_frame_command (char *, int);
-
static void print_frame_arg_vars (struct frame_info *, struct ui_file *);
static void catch_info (char *, int);
@@ -1460,14 +1459,7 @@
and select it. See parse_frame_specification for more info on proper
frame expressions. */
-/* ARGSUSED */
void
-select_frame_command_wrapper (char *level_exp, int from_tty)
-{
- select_frame_command (level_exp, from_tty);
-}
-
-static void
select_frame_command (char *level_exp, int from_tty)
{
struct frame_info *frame;
Index: stack.h
===================================================================
RCS file: stack.h
diff -N stack.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ stack.h 8 Jun 2003 18:05:02 -0000
@@ -0,0 +1,27 @@
+/* Stack manipulation commands, for GDB the GNU Debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef STACK_H
+#define STACK_H
+
+void select_frame_command (char *level_exp, int from_tty);
+
+#endif /* #ifndef STACK_H */
Index: std-regs.c
===================================================================
RCS file: /cvs/src/src/gdb/std-regs.c,v
retrieving revision 1.6
diff -u -r1.6 std-regs.c
--- std-regs.c 3 May 2003 00:26:34 -0000 1.6
+++ std-regs.c 8 Jun 2003 18:05:02 -0000
@@ -133,6 +133,8 @@
error ("Standard register ``$ps'' is not available for this target");
}
+extern initialize_file_ftype _initialize_frame_reg; /* -Wmissing-prototypes */
+
void
_initialize_frame_reg (void)
{
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.96
diff -u -r1.96 symfile.c
--- symfile.c 6 Jun 2003 23:32:59 -0000 1.96
+++ symfile.c 8 Jun 2003 18:05:05 -0000
@@ -3010,7 +3010,7 @@
/* Return true if the mapped ranges of sections A and B overlap, false
otherwise. */
-int
+static int
sections_overlap (asection *a, asection *b)
{
/* FIXME: need bfd *, so we can use bfd_section_vma methods. */
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.72
diff -u -r1.72 top.c
--- top.c 2 Jun 2003 16:02:58 -0000 1.72
+++ top.c 8 Jun 2003 18:05:22 -0000
@@ -490,7 +490,7 @@
void *func_args;
};
-int
+static int
do_catch_errors (struct ui_out *uiout, void *data)
{
struct catch_errors_args *args = data;
@@ -1061,7 +1061,7 @@
/* This is put on the appropriate hook and helps operate-and-get-next
do its work. */
-void
+static void
gdb_rl_operate_and_get_next_completion (void)
{
int delta = where_history () - operate_saved_history;
Index: top.h
===================================================================
RCS file: /cvs/src/src/gdb/top.h,v
retrieving revision 1.8
diff -u -r1.8 top.h
--- top.h 2 Jun 2003 16:02:58 -0000 1.8
+++ top.h 8 Jun 2003 18:05:22 -0000
@@ -72,4 +72,14 @@
extern int server_command;
extern char *lim_at_start;
+extern void show_commands (char *args, int from_tty);
+
+extern void set_history (char *, int);
+
+extern void show_history (char *, int);
+
+extern void set_verbose (char *, int, struct cmd_list_element *);
+
+extern void do_restore_instream_cleanup (void *stream);
+
#endif
Index: typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/typeprint.c,v
retrieving revision 1.17
diff -u -r1.17 typeprint.c
--- typeprint.c 25 Feb 2003 21:36:21 -0000 1.17
+++ typeprint.c 8 Jun 2003 18:05:22 -0000
@@ -33,7 +33,7 @@
#include "target.h"
#include "language.h"
#include "cp-abi.h"
-
+#include "typeprint.h"
#include "gdb_string.h"
#include <errno.h>
Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.26
diff -u -r1.26 ui-out.c
--- ui-out.c 3 Feb 2003 01:18:37 -0000 1.26
+++ ui-out.c 8 Jun 2003 18:05:22 -0000
@@ -437,15 +437,6 @@
}
struct cleanup *
-make_cleanup_ui_out_begin_end (struct ui_out *uiout,
- enum ui_out_type type,
- const char *id)
-{
- ui_out_begin (uiout, type, id);
- return make_cleanup_ui_out_end (uiout, type);
-}
-
-struct cleanup *
make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
const char *id)
{
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.30
diff -u -r1.30 cli-cmds.c
--- cli/cli-cmds.c 7 May 2003 21:42:48 -0000 1.30
+++ cli/cli-cmds.c 8 Jun 2003 18:05:23 -0000
@@ -48,18 +48,6 @@
#define GDBINIT_FILENAME ".gdbinit"
#endif
-/* From gdb/top.c */
-
-extern void dont_repeat (void);
-
-extern void set_verbose (char *, int, struct cmd_list_element *);
-
-extern void show_history (char *, int);
-
-extern void set_history (char *, int);
-
-extern void show_commands (char *, int);
-
/* Prototypes for local command functions */
static void complete_command (char *, int);
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.30
diff -u -r1.30 cli-decode.c
--- cli/cli-decode.c 14 Feb 2003 20:36:58 -0000 1.30
+++ cli/cli-decode.c 8 Jun 2003 18:05:23 -0000
@@ -183,20 +183,6 @@
return c;
}
-/* Same as above, except that the abbrev_flag is set. */
-/* Note: Doesn't seem to be used anywhere currently. */
-
-struct cmd_list_element *
-add_abbrev_cmd (char *name, enum command_class class, void (*fun) (char *, int),
- char *doc, struct cmd_list_element **list)
-{
- register struct cmd_list_element *c
- = add_cmd (name, class, fun, doc, list);
-
- c->abbrev_flag = 1;
- return c;
-}
-
/* Deprecates a command CMD.
REPLACEMENT is the name of the command which should be used in place
of this command, or NULL if no such command exists.
Index: cli/cli-dump.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-dump.c,v
retrieving revision 1.8
diff -u -r1.8 cli-dump.c
--- cli/cli-dump.c 7 Feb 2003 00:27:31 -0000 1.8
+++ cli/cli-dump.c 8 Jun 2003 18:05:23 -0000
@@ -698,6 +698,8 @@
help_list (binary_append_cmdlist, "append binary ", -1, gdb_stdout);
}
+extern initialize_file_ftype _initialize_cli_dump; /* -Wmissing-prototypes */
+
void
_initialize_cli_dump (void)
{
Index: cli/cli-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-interp.c,v
retrieving revision 1.2
diff -u -r1.2 cli-interp.c
--- cli/cli-interp.c 6 Feb 2003 05:30:17 -0000 1.2
+++ cli/cli-interp.c 8 Jun 2003 18:05:23 -0000
@@ -118,6 +118,8 @@
/* standard gdb initialization hook */
+extern initialize_file_ftype _initialize_cli_interp; /* -Wmissing-prototypes */
+
void
_initialize_cli_interp (void)
{
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.16
diff -u -r1.16 cli-script.c
--- cli/cli-script.c 7 Feb 2003 00:27:31 -0000 1.16
+++ cli/cli-script.c 8 Jun 2003 18:05:25 -0000
@@ -34,12 +34,6 @@
#include "cli/cli-decode.h"
#include "cli/cli-script.h"
-/* From gdb/top.c */
-
-extern void dont_repeat (void);
-
-extern void do_restore_instream_cleanup (void *stream);
-
/* Prototypes for local functions */
static struct cleanup *
@@ -216,7 +210,7 @@
/* Handle pre-post hooks. */
-void
+static void
clear_hook_in_cleanup (void *data)
{
struct cmd_list_element *c = data;
@@ -248,7 +242,7 @@
}
/* Execute the command in CMD. */
-void
+static void
do_restore_user_call_depth (void * call_depth)
{
int * depth = call_depth;
Index: mi/mi-cmd-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmd-stack.c,v
retrieving revision 1.17
diff -u -r1.17 mi-cmd-stack.c
--- mi/mi-cmd-stack.c 14 May 2003 17:43:20 -0000 1.17
+++ mi/mi-cmd-stack.c 8 Jun 2003 18:05:31 -0000
@@ -27,11 +27,7 @@
#include "ui-out.h"
#include "symtab.h"
#include "block.h"
-
-/* FIXME: these should go in some .h file but stack.c doesn't have a
- corresponding .h file. These wrappers will be obsolete anyway, once
- we pull the plug on the sanitization. */
-extern void select_frame_command_wrapper (char *, int);
+#include "stack.h"
static void list_args_or_locals (int locals, int values, struct frame_info *fi);
@@ -311,8 +307,8 @@
/* with no args, don't change frame */
if (argc == 0)
- select_frame_command_wrapper (0, 1 /* not used */ );
+ select_frame_command (0, 1 /* not used */ );
else
- select_frame_command_wrapper (argv[0], 1 /* not used */ );
+ select_frame_command (argv[0], 1 /* not used */ );
return MI_CMD_DONE;
}
Index: mi/mi-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-interp.c,v
retrieving revision 1.3
diff -u -r1.3 mi-interp.c
--- mi/mi-interp.c 9 Feb 2003 10:47:37 -0000 1.3
+++ mi/mi-interp.c 8 Jun 2003 18:05:32 -0000
@@ -393,6 +393,8 @@
return gdb_readline (NULL);
}
+extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
+
void
_initialize_mi_interp (void)
{
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.46
diff -u -r1.46 mi-main.c
--- mi/mi-main.c 17 May 2003 06:00:01 -0000 1.46
+++ mi/mi-main.c 8 Jun 2003 18:05:32 -0000
@@ -41,6 +41,7 @@
#include "regcache.h"
#include "gdb.h"
#include "frame.h"
+#include "mi-main.h"
#include <ctype.h>
#include <sys/time.h>
Index: mi/mi-parse.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-parse.c,v
retrieving revision 1.8
diff -u -r1.8 mi-parse.c
--- mi/mi-parse.c 19 Mar 2002 02:51:09 -0000 1.8
+++ mi/mi-parse.c 8 Jun 2003 18:05:32 -0000
@@ -231,8 +231,3 @@
parse->op = MI_COMMAND;
return parse;
}
-
-void
-_initialize_mi_parse (void)
-{
-}
Index: signals/signals.c
===================================================================
RCS file: /cvs/src/src/gdb/signals/signals.c,v
retrieving revision 1.8
diff -u -r1.8 signals.c
--- signals/signals.c 26 Mar 2003 20:44:39 -0000 1.8
+++ signals/signals.c 8 Jun 2003 18:05:36 -0000
@@ -819,6 +819,8 @@
}
#ifndef GDBSERVER
+extern initialize_file_ftype _initialize_signals; /* -Wmissing-prototype */
+
void
_initialize_signals (void)
{