aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-07-11 13:50:50 +0000
committerAndrew Cagney <cagney@redhat.com>2002-07-11 13:50:50 +0000
commit5ae5f592883d573d830841e3ee19d8ee37c3e9d8 (patch)
tree561059d96b9e16c476a18f2b42a47188e7f1363f
parent239e1f3afa2f6bc24acde3b81481f933b40a3531 (diff)
downloadgdb-5ae5f592883d573d830841e3ee19d8ee37c3e9d8.zip
gdb-5ae5f592883d573d830841e3ee19d8ee37c3e9d8.tar.gz
gdb-5ae5f592883d573d830841e3ee19d8ee37c3e9d8.tar.bz2
Fix some K&R isms.
-rw-r--r--gdb/ChangeLog39
-rw-r--r--gdb/c-lang.c6
-rw-r--r--gdb/config/mn10200/tm-mn10200.h5
-rw-r--r--gdb/cris-tdep.c4
-rw-r--r--gdb/dwarf2cfi.c12
-rw-r--r--gdb/frv-tdep.c4
-rw-r--r--gdb/gdbarch.c2
-rw-r--r--gdb/gdbarch.h2
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/gnu-v3-abi.c2
-rw-r--r--gdb/language.c2
-rw-r--r--gdb/m68k-tdep.c2
-rw-r--r--gdb/m68klinux-nat.c2
-rw-r--r--gdb/mcore-tdep.c2
-rw-r--r--gdb/memattr.c2
-rw-r--r--gdb/os9kread.c6
-rw-r--r--gdb/procfs.c3
-rw-r--r--gdb/remote-es.c6
-rw-r--r--gdb/remote.c2
-rw-r--r--gdb/s390-tdep.c8
-rw-r--r--gdb/stabsread.h17
-rw-r--r--gdb/symtab.h5
-rw-r--r--gdb/target.c5
-rw-r--r--gdb/top.c2
-rw-r--r--gdb/win32-nat.c2
-rw-r--r--gdb/windows-nat.c2
26 files changed, 91 insertions, 57 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bc042a7..260b64f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,44 @@
2002-07-10 Andrew Cagney <ac131313@redhat.com>
+ * win32-nat.c (has_detach_ability): Convert to strict ISO C
+ prototype.
+ * top.c (gdb_rl_operate_and_get_next_completion): Ditto.
+ * s390-tdep.c (s390_fp_regnum): Ditto.
+ (s390_read_fp): Ditto.
+ (s390_pop_frame): Ditto.
+ (_initialize_s390_tdep): Ditto.
+ * remote.c (get_remote_state): Ditto.
+ * procfs.c (mappingflags): Ditto.
+ * memattr.c (_initialize_mem): Ditto.
+ * mcore-tdep.c (mcore_pop_frame): Ditto.
+ * m68klinux-nat.c (_initialize_m68k_linux_nat): Ditto.
+ * m68k-tdep.c (m68k_register_bytes_ok): Ditto.
+ * language.c (set_case_str): Ditto.
+ * gnu-v3-abi.c (vtable_address_point_offset): Ditto.
+ * frv-tdep.c (new_variant): Ditto.
+ (frv_stopped_data_address): Ditto.
+ * dwarf2cfi.c (fde_chunks_need_space): Ditto.
+ (context_alloc): Ditto.
+ (frame_state_alloc): Ditto.
+ (unwind_tmp_obstack_init): Ditto.
+ (unwind_tmp_obstack_free): Ditto.
+ (cfi_read_fp): Ditto.
+ * cris-tdep.c (cris_saved_pc_after_call): Ditto.
+ (cris_pop_frame): Ditto.
+ * c-lang.c (scanning_macro_expansion): Ditto.
+ (finished_macro_expansion): Ditto.
+ (c_preprocess_and_parse): Ditto.
+ * gdbarch.sh: Ditto.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * config/mn10200/tm-mn10200.h: Adjust indentation.
+ * target.c: Adjust indentation.
+ * symtab.h: Adjust indentation.
+ * stabsread.h: Adjust indentation.
+ * remote-es.c: Adjust indentation.
+ * os9kread.c: Adjust indentation.
+
+2002-07-10 Andrew Cagney <ac131313@redhat.com>
+
* wince.c (_initialize_wince): Rename _initialize_inftarg.
* win32-nat.c (_initialize_win32_nat): Rename _initialize_inftarg.
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 09a2e6a..9ee92ad 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -415,14 +415,14 @@ scan_macro_expansion (char *expansion)
int
-scanning_macro_expansion ()
+scanning_macro_expansion (void)
{
return macro_original_text != 0;
}
void
-finished_macro_expansion ()
+finished_macro_expansion (void)
{
/* There'd better be something to pop back to, and we better have
saved a pointer to the start of the expanded text. */
@@ -461,7 +461,7 @@ null_macro_lookup (const char *name, void *baton)
static int
-c_preprocess_and_parse ()
+c_preprocess_and_parse (void)
{
/* Set up a lookup function for the macro expander. */
struct macro_scope *scope = 0;
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index 7f96130..d1b7eac 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -197,9 +197,8 @@ extern CORE_ADDR mn10200_push_return_address (CORE_ADDR, CORE_ADDR);
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
-extern CORE_ADDR
-mn10200_push_arguments (int, struct value **, CORE_ADDR,
- unsigned char, CORE_ADDR);
+extern CORE_ADDR mn10200_push_arguments (int, struct value **, CORE_ADDR,
+ unsigned char, CORE_ADDR);
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 864bac1..f552de9 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -775,7 +775,7 @@ cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
the content of the register PC after a function call. */
CORE_ADDR
-cris_saved_pc_after_call ()
+cris_saved_pc_after_call (void)
{
return read_register (SRP_REGNUM);
}
@@ -1520,7 +1520,7 @@ cris_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
all saved registers. */
void
-cris_pop_frame ()
+cris_pop_frame (void)
{
register struct frame_info *fi = get_current_frame ();
register int regno;
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 8d9567f..3544dce 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -273,7 +273,7 @@ cie_unit_alloc (void)
}
static void
-fde_chunks_need_space ()
+fde_chunks_need_space (void)
{
if (fde_chunks.elems < fde_chunks.array_size)
return;
@@ -286,7 +286,7 @@ fde_chunks_need_space ()
/* Alocate a new `struct context' on temporary obstack. */
static struct context *
-context_alloc ()
+context_alloc (void)
{
struct context *context;
@@ -303,7 +303,7 @@ context_alloc ()
/* Alocate a new `struct frame_state' on temporary obstack. */
static struct frame_state *
-frame_state_alloc ()
+frame_state_alloc (void)
{
struct frame_state *fs;
@@ -319,13 +319,13 @@ frame_state_alloc ()
}
static void
-unwind_tmp_obstack_init ()
+unwind_tmp_obstack_init (void)
{
obstack_init (&unwind_tmp_obstack);
}
static void
-unwind_tmp_obstack_free ()
+unwind_tmp_obstack_free (void)
{
obstack_free (&unwind_tmp_obstack, NULL);
unwind_tmp_obstack_init ();
@@ -1691,7 +1691,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
/* Return the frame address. */
CORE_ADDR
-cfi_read_fp ()
+cfi_read_fp (void)
{
struct context *context;
struct frame_state *fs;
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 9e0c99c..91f47fc 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -147,7 +147,7 @@ struct gdbarch_tdep
/* Allocate a new variant structure, and set up default values for all
the fields. */
static struct gdbarch_tdep *
-new_variant ()
+new_variant (void)
{
struct gdbarch_tdep *var;
int r;
@@ -987,7 +987,7 @@ frv_check_watch_resources (int type, int cnt, int ot)
CORE_ADDR
-frv_stopped_data_address ()
+frv_stopped_data_address (void)
{
CORE_ADDR brr, dbar0, dbar1, dbar2, dbar3;
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 079c768..b9339e3 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -422,7 +422,7 @@ struct gdbarch *current_gdbarch = &startup_gdbarch;
/* Do any initialization needed for a non-multiarch configuration
after the _initialize_MODULE functions have been run. */
void
-initialize_non_multiarch ()
+initialize_non_multiarch (void)
{
alloc_gdbarch_data (&startup_gdbarch);
/* Ensure that all swap areas are zeroed so that they again think
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index c1443c8..9e23310 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2739,7 +2739,7 @@ extern void initialize_current_architecture (void);
/* For non-multiarched targets, do any initialization of the default
gdbarch object necessary after the _initialize_MODULE functions
have run. */
-extern void initialize_non_multiarch ();
+extern void initialize_non_multiarch (void);
/* gdbarch trace variable */
extern int gdbarch_debug;
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 2bdc387..f8b785b 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1187,7 +1187,7 @@ extern void initialize_current_architecture (void);
/* For non-multiarched targets, do any initialization of the default
gdbarch object necessary after the _initialize_MODULE functions
have run. */
-extern void initialize_non_multiarch ();
+extern void initialize_non_multiarch (void);
/* gdbarch trace variable */
extern int gdbarch_debug;
@@ -1371,7 +1371,7 @@ struct gdbarch *current_gdbarch = &startup_gdbarch;
/* Do any initialization needed for a non-multiarch configuration
after the _initialize_MODULE functions have been run. */
void
-initialize_non_multiarch ()
+initialize_non_multiarch (void)
{
alloc_gdbarch_data (&startup_gdbarch);
/* Ensure that all swap areas are zeroed so that they again think
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index a9ab494..4df4dc6 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -173,7 +173,7 @@ build_gdb_vtable_type (struct gdbarch *arch)
gdb_gnu_v3_abi_vtable' object to the vtable's "address point"
(i.e., where objects' virtual table pointers point). */
static int
-vtable_address_point_offset ()
+vtable_address_point_offset (void)
{
struct type *vtable_type = gdbarch_data (current_gdbarch,
vtable_type_gdbarch_data);
diff --git a/gdb/language.c b/gdb/language.c
index 1bfba98..9cbb317 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -484,7 +484,7 @@ set_range_str (void)
}
static void
-set_case_str()
+set_case_str (void)
{
char *tmp = NULL, *prefix = "";
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index a39fa94..b00b0ee 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -120,7 +120,7 @@ m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
static int
-m68k_register_bytes_ok (numbytes)
+m68k_register_bytes_ok (long numbytes)
{
return ((numbytes == REGISTER_BYTES_FP)
|| (numbytes == REGISTER_BYTES_NOFP));
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 82a6124..add1490 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -704,7 +704,7 @@ static struct core_fns linux_elf_core_fns =
};
void
-_initialize_m68k_linux_nat ()
+_initialize_m68k_linux_nat (void)
{
add_core_fns (&linux_elf_core_fns);
}
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index f17f8e4..6036389 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -783,7 +783,7 @@ mcore_frame_saved_pc (struct frame_info * fi)
command, or the call dummy breakpoint gets hit. */
void
-mcore_pop_frame ()
+mcore_pop_frame (void)
{
int rn;
struct frame_info *fi = get_current_frame ();
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 37a97eb..aaaaba7 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -507,7 +507,7 @@ mem_delete_command (char *args, int from_tty)
}
void
-_initialize_mem ()
+_initialize_mem (void)
{
add_com ("mem", class_vars, mem_command,
"Define attributes for memory region.\n\
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index 498498b..b36e718 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -144,9 +144,9 @@ static void os9k_symfile_read (struct objfile *, int);
static void os9k_symfile_finish (struct objfile *);
-static void
-os9k_process_one_symbol (int, int, CORE_ADDR, char *,
- struct section_offsets *, struct objfile *);
+static void os9k_process_one_symbol (int, int, CORE_ADDR, char *,
+ struct section_offsets *,
+ struct objfile *);
static struct partial_symtab *os9k_start_psymtab (struct objfile *, char *,
CORE_ADDR, int, int,
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 55e0496..7688899 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -5431,8 +5431,7 @@ proc_find_memory_regions (int (*func) (CORE_ADDR,
*/
static char *
-mappingflags (flags)
- long flags;
+mappingflags (long flags)
{
static char asciiflags[8];
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index e489254..24183cc 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -136,9 +136,9 @@ static int es1800_insert_breakpoint (CORE_ADDR, char *);
static void es1800_files_info (struct target_ops *);
-static int
-es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
- struct mem_attrib *, struct target_ops *);
+static int es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
+ struct mem_attrib *,
+ struct target_ops *);
static void es1800_prepare_to_store (void);
diff --git a/gdb/remote.c b/gdb/remote.c
index 8231a57..1758d17 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -254,7 +254,7 @@ struct remote_state
static struct gdbarch_data *remote_gdbarch_data_handle;
static struct remote_state *
-get_remote_state ()
+get_remote_state (void)
{
return gdbarch_data (current_gdbarch, remote_gdbarch_data_handle);
}
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index b1055ed..f751cdf 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1189,7 +1189,7 @@ gdb_print_insn_s390 (bfd_vma memaddr, disassemble_info * info)
/* Not the most efficent code in the world */
int
-s390_fp_regnum ()
+s390_fp_regnum (void)
{
int regno = S390_SP_REGNUM;
struct frame_extra_info fextra_info;
@@ -1204,7 +1204,7 @@ s390_fp_regnum ()
}
CORE_ADDR
-s390_read_fp ()
+s390_read_fp (void)
{
return read_register (s390_fp_regnum ());
}
@@ -1246,7 +1246,7 @@ s390_pop_frame_regular (struct frame_info *frame)
Used in the contexts of the "return" command, and of
target function calls from the debugger. */
void
-s390_pop_frame ()
+s390_pop_frame (void)
{
/* This function checks for and handles generic dummy frames, and
calls back to our function for ordinary frames. */
@@ -1874,7 +1874,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
void
-_initialize_s390_tdep ()
+_initialize_s390_tdep (void)
{
/* Hook us into the gdbarch mechanism. */
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 59504da..485ebf4 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -182,15 +182,14 @@ extern struct partial_symtab *end_psymtab (struct partial_symtab *pst,
int number_dependencies,
int textlow_not_set);
-extern void
-process_one_symbol (int, int, CORE_ADDR, char *,
- struct section_offsets *, struct objfile *);
-
-extern void elfstab_build_psymtabs
- (struct objfile *objfile,
- int mainline,
- file_ptr staboff, unsigned int stabsize,
- file_ptr stabstroffset, unsigned int stabstrsize);
+extern void process_one_symbol (int, int, CORE_ADDR, char *,
+ struct section_offsets *, struct objfile *);
+
+extern void elfstab_build_psymtabs (struct objfile *objfile,
+ int mainline,
+ file_ptr staboff, unsigned int stabsize,
+ file_ptr stabstroffset,
+ unsigned int stabstrsize);
extern void coffstab_build_psymtabs
(struct objfile *objfile,
diff --git a/gdb/symtab.h b/gdb/symtab.h
index bf0fb1a..713dd0d 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1076,9 +1076,8 @@ find_pc_partial_function (CORE_ADDR, char **, CORE_ADDR *, CORE_ADDR *);
extern void clear_pc_function_cache (void);
-extern int
-find_pc_sect_partial_function (CORE_ADDR, asection *,
- char **, CORE_ADDR *, CORE_ADDR *);
+extern int find_pc_sect_partial_function (CORE_ADDR, asection *,
+ char **, CORE_ADDR *, CORE_ADDR *);
/* from symtab.c: */
diff --git a/gdb/target.c b/gdb/target.c
index a40cebd..9d9819b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -103,9 +103,8 @@ static void debug_to_store_registers (int);
static void debug_to_prepare_to_store (void);
-static int
-debug_to_xfer_memory (CORE_ADDR, char *, int, int, struct mem_attrib *,
- struct target_ops *);
+static int debug_to_xfer_memory (CORE_ADDR, char *, int, int,
+ struct mem_attrib *, struct target_ops *);
static void debug_to_files_info (struct target_ops *);
diff --git a/gdb/top.c b/gdb/top.c
index 4203f08..10afc64 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1037,7 +1037,7 @@ static int operate_saved_history = -1;
/* This is put on the appropriate hook and helps operate-and-get-next
do its work. */
void
-gdb_rl_operate_and_get_next_completion ()
+gdb_rl_operate_and_get_next_completion (void)
{
int delta = where_history () - operate_saved_history;
/* The `key' argument to rl_get_previous_history is ignored. */
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 901db27..e0377c5 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1334,7 +1334,7 @@ static BOOL WINAPI (*DebugSetProcessKillOnExit)(BOOL);
static BOOL WINAPI (*DebugActiveProcessStop)(DWORD);
static int
-has_detach_ability ()
+has_detach_ability (void)
{
static HMODULE kernel32 = NULL;
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 901db27..e0377c5 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1334,7 +1334,7 @@ static BOOL WINAPI (*DebugSetProcessKillOnExit)(BOOL);
static BOOL WINAPI (*DebugActiveProcessStop)(DWORD);
static int
-has_detach_ability ()
+has_detach_ability (void)
{
static HMODULE kernel32 = NULL;