From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24508 invoked by alias); 26 Sep 2008 23:32:27 -0000 Received: (qmail 24499 invoked by uid 22791); 26 Sep 2008 23:32:27 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Sep 2008 23:31:52 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m8QNVpeB022462 for ; Fri, 26 Sep 2008 19:31:51 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m8QNVoFJ003742; Fri, 26 Sep 2008 19:31:50 -0400 Received: from opsy.redhat.com (vpn-10-95.bos.redhat.com [10.16.10.95]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m8QNVnHm025098; Fri, 26 Sep 2008 19:31:49 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EED20508598; Fri, 26 Sep 2008 17:30:50 -0600 (MDT) To: gdb-patches@sourceware.org Subject: RFA: change K&R to ISO From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Fri, 26 Sep 2008 23:32:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00535.txt.bz2 I noticed some K&R-style function definitions. This seemed weird, so this patch changes them to ISO style. Built & regtested on x86-64 (compile farm). Please review. Tom :ADDPATCH java: 2008-09-26 Tom Tromey * jv-exp.y (insert_exp): Define using ISO syntax. (copy_exp): Likewise. (push_expression_name): Likewise. (push_fieldnames): Likewise. (java_type_from_name): Likewise. (yyerror): Likewise. (yylex): Likewise. (parse_number): Likewise. diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index ff9a7a1..12bf517 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -693,11 +693,7 @@ Expression: /*** 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) { ULONGEST n = 0; ULONGEST limit, limit_div_base; @@ -851,7 +847,7 @@ static const struct token tokentab2[] = /* Read one token, getting characters through lexptr. */ static int -yylex () +yylex (void) { int c; int namelen; @@ -1197,8 +1193,7 @@ yylex () } void -yyerror (msg) - char *msg; +yyerror (char *msg) { if (prev_lexptr) lexptr = prev_lexptr; @@ -1210,9 +1205,7 @@ yyerror (msg) } static struct type * -java_type_from_name (name) - struct stoken name; - +java_type_from_name (struct stoken name) { char *tmp = copy_name (name); struct type *typ = java_lookup_class (tmp); @@ -1271,8 +1264,7 @@ push_variable (struct stoken name) qualified name (has '.'), generate a field access for each part. */ static void -push_fieldnames (name) - struct stoken name; +push_fieldnames (struct stoken name) { int i; struct stoken token; @@ -1363,8 +1355,7 @@ push_qualified_expression_name (struct stoken name, int dot_index) Handle VAR, TYPE, TYPE.FIELD1....FIELDN and VAR.FIELD1....FIELDN. */ static void -push_expression_name (name) - struct stoken name; +push_expression_name (struct stoken name) { char *tmp; struct type *typ; @@ -1418,9 +1409,7 @@ push_expression_name (name) into a freshly malloc'ed struct expression. Its language_defn is set to null. */ static struct expression * -copy_exp (expr, endpos) - struct expression *expr; - int endpos; +copy_exp (struct expression *expr, int endpos) { int len = length_of_subexp (expr, endpos); struct expression *new @@ -1434,9 +1423,7 @@ copy_exp (expr, endpos) /* Insert the expression NEW into the current expression (expout) at POS. */ static void -insert_exp (pos, new) - int pos; - struct expression *new; +insert_exp (int pos, struct expression *new) { int newlen = new->nelts;