Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: qinwei@sunnorth.com.cn
Cc: gdb-patches@sourceware.org
Subject: RFA: score-tdep.c: avoid mixed declarations and statements
Date: Mon, 08 Jan 2007 23:03:00 -0000	[thread overview]
Message-ID: <m364bh9l3q.fsf@codesourcery.com> (raw)


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  <jimb@codesourcery.com>

	* 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.  */


             reply	other threads:[~2007-01-08 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 23:03 Jim Blandy [this message]
2007-01-08 23:13 ` Daniel Jacobowitz
2007-01-09  3:38 ` qinwei
2007-01-09 21:25   ` Jim Blandy
2007-01-09 10:04 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m364bh9l3q.fsf@codesourcery.com \
    --to=jimb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qinwei@sunnorth.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox