From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13375 invoked by alias); 9 Jan 2007 03:38:09 -0000 Received: (qmail 13366 invoked by uid 22791); 9 Jan 2007 03:38:08 -0000 X-Spam-Check-By: sourceware.org Received: from mail.sunnorth.com.cn (HELO mswbj01.sunnorth.com.cn) (124.42.0.200) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Jan 2007 03:38:04 +0000 Received: from maillog.sunnorth.com.cn (unverified [172.20.10.250]) by mswbj01.sunnorth.com.cn (Clearswift SMTPRS 5.2.5) with ESMTP id ; Tue, 9 Jan 2007 11:37:51 +0800 Received: from ntns1cn.sunnorth.com.cn (ntns1cn.sunnorth.com.cn [172.20.10.252]) by maillog.sunnorth.com.cn (8.12.10/8.12.10) with ESMTP id l095Cu9F029591; Tue, 9 Jan 2007 13:12:56 +0800 In-Reply-To: To: Jim Blandy Cc: gdb-patches@sourceware.org Subject: Re: RFA: score-tdep.c: avoid mixed declarations and statements MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: qinwei Date: Tue, 09 Jan 2007 03:38:00 -0000 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: 2007-01/txt/msg00252.txt.bz2 > We recently added -Wdeclaration-after-statement to GDB's set of build > warnings, which caught the new S+core port. > > Okay to commit? > > gdb/ChangeLog: > 2007-01-08 Jim Blandy > > * score-tdep.c (score_push_dummy_call): Don't mix declarations and > statements. > > ? gdb/autom4te.cache > Index: gdb/score-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/score-tdep.c,v > retrieving revision 1.1 > diff -u -p -r1.1 score-tdep.c > --- gdb/score-tdep.c 4 Jan 2007 07:09:54 -0000 1.1 > +++ gdb/score-tdep.c 8 Jan 2007 22:57:33 -0000 > @@ -435,14 +435,15 @@ score_push_dummy_call (struct gdbarch *g > { > struct value *arg = args[argnum]; > struct type *arg_type = check_typedef (value_type (arg)); > - arglen = TYPE_LENGTH (arg_type); > enum type_code typecode = TYPE_CODE (arg_type); > const gdb_byte *val = value_contents (arg); > int downward_offset = 0; > + int odd_sized_struct_p; > + int arg_last_part_p = 0; > > - int odd_sized_struct_p = (arglen > SCORE_REGSIZE > + arglen = TYPE_LENGTH (arg_type); > + odd_sized_struct_p = (arglen > SCORE_REGSIZE > && arglen % SCORE_REGSIZE != 0); > - int arg_last_part_p = 0; > > /* If a arg should be aligned to 8 bytes (long long or double), > the value should be put to even register numbers. */ OK. Best regards, Qinwei Mail qinwei@sunnorth.com.cn Phone +86-010-62981668-2708 Fax +86-010-62985972