This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix some K&R isms


Just FYI,

Some stray K&R style declarations.

committed,
Andrew
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.

Index: c-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/c-lang.c,v
retrieving revision 1.12
diff -u -r1.12 c-lang.c
--- c-lang.c	17 May 2002 17:57:48 -0000	1.12
+++ c-lang.c	11 Jul 2002 03:55:31 -0000
@@ -415,14 +415,14 @@
 
 
 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 @@
 
 
 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;
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.18
diff -u -r1.18 cris-tdep.c
--- cris-tdep.c	26 Jun 2002 15:28:46 -0000	1.18
+++ cris-tdep.c	11 Jul 2002 03:55:52 -0000
@@ -775,7 +775,7 @@
    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 @@
    all saved registers.  */
 
 void 
-cris_pop_frame ()
+cris_pop_frame (void)
 {
   register struct frame_info *fi = get_current_frame ();
   register int regno;
Index: dwarf2cfi.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
retrieving revision 1.13
diff -u -r1.13 dwarf2cfi.c
--- dwarf2cfi.c	8 Jul 2002 20:53:45 -0000	1.13
+++ dwarf2cfi.c	11 Jul 2002 03:55:53 -0000
@@ -273,7 +273,7 @@
 }
 
 static void
-fde_chunks_need_space ()
+fde_chunks_need_space (void)
 {
   if (fde_chunks.elems < fde_chunks.array_size)
     return;
@@ -286,7 +286,7 @@
 
 /* Alocate a new `struct context' on temporary obstack.  */
 static struct context *
-context_alloc ()
+context_alloc (void)
 {
   struct context *context;
 
@@ -303,7 +303,7 @@
 
 /* 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 @@
 }
 
 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 @@
 
 /* Return the frame address.  */
 CORE_ADDR
-cfi_read_fp ()
+cfi_read_fp (void)
 {
   struct context *context;
   struct frame_state *fs;
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.1
diff -u -r1.1 frv-tdep.c
--- frv-tdep.c	21 Jun 2002 21:19:57 -0000	1.1
+++ frv-tdep.c	11 Jul 2002 03:55:56 -0000
@@ -147,7 +147,7 @@
 /* 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 @@
 
 
 CORE_ADDR
-frv_stopped_data_address ()
+frv_stopped_data_address (void)
 {
   CORE_ADDR brr, dbar0, dbar1, dbar2, dbar3;
 
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.136
diff -u -r1.136 gdbarch.c
--- gdbarch.c	3 Jul 2002 21:27:55 -0000	1.136
+++ gdbarch.c	11 Jul 2002 03:56:04 -0000
@@ -422,7 +422,7 @@
 /* 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
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.105
diff -u -r1.105 gdbarch.h
--- gdbarch.h	3 Jul 2002 21:27:55 -0000	1.105
+++ gdbarch.h	11 Jul 2002 03:56:08 -0000
@@ -2739,7 +2739,7 @@
 /* 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;
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.148
diff -u -r1.148 gdbarch.sh
--- gdbarch.sh	3 Jul 2002 21:27:55 -0000	1.148
+++ gdbarch.sh	11 Jul 2002 03:56:12 -0000
@@ -1187,7 +1187,7 @@
 /* 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 @@
 /* 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
Index: gnu-v3-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v3-abi.c,v
retrieving revision 1.11
diff -u -r1.11 gnu-v3-abi.c
--- gnu-v3-abi.c	5 Jul 2002 16:23:13 -0000	1.11
+++ gnu-v3-abi.c	11 Jul 2002 03:56:12 -0000
@@ -173,7 +173,7 @@
    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);
Index: language.c
===================================================================
RCS file: /cvs/src/src/gdb/language.c,v
retrieving revision 1.24
diff -u -r1.24 language.c
--- language.c	12 May 2002 04:20:05 -0000	1.24
+++ language.c	11 Jul 2002 03:56:12 -0000
@@ -484,7 +484,7 @@
 }
 
 static void
-set_case_str()
+set_case_str (void)
 {
    char *tmp = NULL, *prefix = "";
 
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.22
diff -u -r1.22 m68k-tdep.c
--- m68k-tdep.c	2 Jul 2002 18:13:51 -0000	1.22
+++ m68k-tdep.c	11 Jul 2002 03:56:18 -0000
@@ -120,7 +120,7 @@
 
 
 static int
-m68k_register_bytes_ok (numbytes)
+m68k_register_bytes_ok (long numbytes)
 {
   return ((numbytes == REGISTER_BYTES_FP)
 	  || (numbytes == REGISTER_BYTES_NOFP));
Index: m68klinux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68klinux-nat.c,v
retrieving revision 1.11
diff -u -r1.11 m68klinux-nat.c
--- m68klinux-nat.c	6 Apr 2002 23:42:15 -0000	1.11
+++ m68klinux-nat.c	11 Jul 2002 03:56:20 -0000
@@ -704,7 +704,7 @@
 };
 
 void
-_initialize_m68k_linux_nat ()
+_initialize_m68k_linux_nat (void)
 {
   add_core_fns (&linux_elf_core_fns);
 }
Index: mcore-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-tdep.c,v
retrieving revision 1.16
diff -u -r1.16 mcore-tdep.c
--- mcore-tdep.c	4 Jul 2002 16:45:51 -0000	1.16
+++ mcore-tdep.c	11 Jul 2002 03:56:23 -0000
@@ -783,7 +783,7 @@
    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 ();
Index: memattr.c
===================================================================
RCS file: /cvs/src/src/gdb/memattr.c,v
retrieving revision 1.12
diff -u -r1.12 memattr.c
--- memattr.c	24 Jun 2002 22:08:30 -0000	1.12
+++ memattr.c	11 Jul 2002 03:56:27 -0000
@@ -507,7 +507,7 @@
 }
 
 void
-_initialize_mem ()
+_initialize_mem (void)
 {
   add_com ("mem", class_vars, mem_command,
 	   "Define attributes for memory region.\n\
Index: os9kread.c
===================================================================
RCS file: /cvs/src/src/gdb/os9kread.c,v
retrieving revision 1.12
diff -u -r1.12 os9kread.c
--- os9kread.c	2 Dec 2001 22:38:23 -0000	1.12
+++ os9kread.c	11 Jul 2002 03:56:31 -0000
@@ -144,9 +144,9 @@
 
 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,
Index: procfs.c
===================================================================
RCS file: /cvs/src/src/gdb/procfs.c,v
retrieving revision 1.37
diff -u -r1.37 procfs.c
--- procfs.c	14 Feb 2002 01:57:36 -0000	1.37
+++ procfs.c	11 Jul 2002 03:56:43 -0000
@@ -5431,8 +5431,7 @@
  */
 
 static char *
-mappingflags (flags)
-     long flags;
+mappingflags (long flags)
 {
   static char asciiflags[8];
 
Index: remote-es.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-es.c,v
retrieving revision 1.21
diff -u -r1.21 remote-es.c
--- remote-es.c	29 Apr 2002 11:01:13 -0000	1.21
+++ remote-es.c	11 Jul 2002 03:56:46 -0000
@@ -136,9 +136,9 @@
 
 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);
 
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.87
diff -u -r1.87 remote.c
--- remote.c	15 Jun 2002 22:05:32 -0000	1.87
+++ remote.c	11 Jul 2002 03:57:06 -0000
@@ -254,7 +254,7 @@
 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);
 }
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.48
diff -u -r1.48 s390-tdep.c
--- s390-tdep.c	26 Jun 2002 15:28:46 -0000	1.48
+++ s390-tdep.c	11 Jul 2002 03:57:08 -0000
@@ -1189,7 +1189,7 @@
 
 /* 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 @@
 }
 
 CORE_ADDR
-s390_read_fp ()
+s390_read_fp (void)
 {
   return read_register (s390_fp_regnum ());
 }
@@ -1246,7 +1246,7 @@
    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 @@
 
 
 void
-_initialize_s390_tdep ()
+_initialize_s390_tdep (void)
 {
 
   /* Hook us into the gdbarch mechanism.  */
Index: stabsread.h
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.h,v
retrieving revision 1.6
diff -u -r1.6 stabsread.h
--- stabsread.h	5 Sep 2001 02:54:15 -0000	1.6
+++ stabsread.h	11 Jul 2002 03:57:08 -0000
@@ -182,15 +182,14 @@
 					   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,
Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.33
diff -u -r1.33 symtab.h
--- symtab.h	28 Jun 2002 22:09:11 -0000	1.33
+++ symtab.h	11 Jul 2002 03:57:09 -0000
@@ -1076,9 +1076,8 @@
 
 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: */
 
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.37
diff -u -r1.37 target.c
--- target.c	25 Jun 2002 05:39:17 -0000	1.37
+++ target.c	11 Jul 2002 03:57:12 -0000
@@ -103,9 +103,8 @@
 
 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 *);
 
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.63
diff -u -r1.63 top.c
--- top.c	3 Jul 2002 17:35:19 -0000	1.63
+++ top.c	11 Jul 2002 03:57:14 -0000
@@ -1037,7 +1037,7 @@
 /* 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.  */
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.59
diff -u -r1.59 win32-nat.c
--- win32-nat.c	10 Jul 2002 22:38:05 -0000	1.59
+++ win32-nat.c	11 Jul 2002 03:57:16 -0000
@@ -1334,7 +1334,7 @@
 static BOOL WINAPI (*DebugActiveProcessStop)(DWORD);
 
 static int
-has_detach_ability ()
+has_detach_ability (void)
 {
   static HMODULE kernel32 = NULL;
 
Index: config/mn10200/tm-mn10200.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mn10200/tm-mn10200.h,v
retrieving revision 1.9
diff -u -r1.9 tm-mn10200.h
--- config/mn10200/tm-mn10200.h	14 Jun 2002 22:55:48 -0000	1.9
+++ config/mn10200/tm-mn10200.h	11 Jul 2002 03:57:18 -0000
@@ -197,9 +197,8 @@
 
 #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))
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]