Fix some K&R isms.

This commit is contained in:
Andrew Cagney 2002-07-11 13:50:50 +00:00
parent 239e1f3afa
commit 5ae5f59288
26 changed files with 90 additions and 56 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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))

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -484,7 +484,7 @@ set_range_str (void)
}
static void
set_case_str()
set_case_str (void)
{
char *tmp = NULL, *prefix = "";

View File

@ -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));

View File

@ -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);
}

View File

@ -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 ();

View File

@ -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\

View File

@ -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,

View File

@ -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];

View File

@ -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);

View File

@ -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);
}

View File

@ -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. */

View File

@ -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 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 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,

View File

@ -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: */

View File

@ -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 *);

View File

@ -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. */

View File

@ -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;

View File

@ -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;