This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix K&R-style definitions
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 05 Jun 2009 11:18:22 -0600
- Subject: FYI: fix K&R-style definitions
- Reply-to: tromey at redhat dot com
I'm checking this in.
I noticed a couple of K&R-style function definitions in c-exp.y.
This patch updates these.
Tom
2009-06-05 Tom Tromey <tromey@redhat.com>
* c-exp.y (parse_number): Don't use K&R definition.
(yylex): Likewise.
(yyerror): Likewise.
Index: c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.55
diff -u -r1.55 c-exp.y
--- c-exp.y 28 Apr 2009 01:03:23 -0000 1.55
+++ c-exp.y 5 Jun 2009 16:15:54 -0000
@@ -1139,11 +1139,7 @@
/*** Needs some error checking for the float case ***/
static int
-parse_number (p, len, parsed_float, putithere)
- char *p;
- int len;
- int parsed_float;
- YYSTYPE *putithere;
+parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative values
here, and we do kind of silly things like cast to unsigned. */
@@ -1808,7 +1804,7 @@
/* Read one token, getting characters through lexptr. */
static int
-yylex ()
+yylex (void)
{
int c;
int namelen;
@@ -2209,8 +2205,7 @@
void
-yyerror (msg)
- char *msg;
+yyerror (char *msg)
{
if (prev_lexptr)
lexptr = prev_lexptr;