This is the mail archive of the gdb-patches@sourceware.org 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]

FYI: trivial patch to change () to (void)


I'm checking this in.

I noticed a few places where we were using () instead of (void).

Built and regtested on x86-64 (compile farm).

Tom

2010-03-02  Tom Tromey  <tromey@redhat.com>

	* mi/mi-cmd-break.c (mi_read_next_line): Add missing 'void'.
	* defs.h (read_command_lines_1): Add missing 'void'.
	* cli/cli-script.c (recurse_read_control_structure): Add missing
	'void'.
	(read_next_line): Likewise.
	(read_command_lines_1): Likewise.

Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.265
diff -u -r1.265 defs.h
--- defs.h	25 Feb 2010 20:30:58 -0000	1.265
+++ defs.h	2 Mar 2010 18:08:32 -0000
@@ -707,7 +707,7 @@
   };
 
 extern struct command_line *read_command_lines (char *, int, int);
-extern struct command_line *read_command_lines_1 (char * (*) (), int);
+extern struct command_line *read_command_lines_1 (char * (*) (void), int);
 
 extern void free_command_lines (struct command_line **);
 
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.57
diff -u -r1.57 cli-script.c
--- cli/cli-script.c	1 Jan 2010 10:58:56 -0000	1.57
+++ cli/cli-script.c	2 Mar 2010 18:08:32 -0000
@@ -39,14 +39,14 @@
 /* Prototypes for local functions */
 
 static enum command_control_type
-recurse_read_control_structure (char * (*read_next_line_func) (), 
+recurse_read_control_structure (char * (*read_next_line_func) (void),
 				struct command_line *current_cmd);
 
 static char *insert_args (char *line);
 
 static struct cleanup * setup_user_args (char *p);
 
-static char *read_next_line ();
+static char *read_next_line (void);
 
 /* Level of control structure when reading.  */
 static int control_level;
@@ -845,7 +845,7 @@
    from stdout.  */
 
 static char *
-read_next_line ()
+read_next_line (void)
 {
   char *prompt_ptr, control_prompt[256];
   int i = 0;
@@ -997,7 +997,7 @@
 */
 
 static enum command_control_type
-recurse_read_control_structure (char * (*read_next_line_func) (), 
+recurse_read_control_structure (char * (*read_next_line_func) (void),
 				struct command_line *current_cmd)
 {
   int current_body, i;
@@ -1145,7 +1145,7 @@
    obtained using READ_NEXT_LINE_FUNC.  */
 
 struct command_line *
-read_command_lines_1 (char * (*read_next_line_func) (), int parse_commands)
+read_command_lines_1 (char * (*read_next_line_func) (void), int parse_commands)
 {
   struct command_line *head, *tail, *next;
   struct cleanup *old_chain;
Index: mi/mi-cmd-break.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmd-break.c,v
retrieving revision 1.27
diff -u -r1.27 mi-cmd-break.c
--- mi/mi-cmd-break.c	1 Jan 2010 07:31:50 -0000	1.27
+++ mi/mi-cmd-break.c	2 Mar 2010 18:08:32 -0000
@@ -263,7 +263,7 @@
 static int mi_command_line_array_ptr;
 
 static char *
-mi_read_next_line ()
+mi_read_next_line (void)
 {
   if (mi_command_line_array_ptr == mi_command_line_array_cnt)
     return NULL;


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