Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@cambridge.redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: ARM simulator coredump
Date: Thu, 10 Jan 2002 08:13:00 -0000	[thread overview]
Message-ID: <m3bsg28a0u.fsf@north-pole.nickc.cambridge.redhat.com> (raw)
In-Reply-To: <3C3DB00F.6050605@cygnus.com>

Hi Andrew,

> > +      {
> >> +	ARMword temp;
> > There is no need to declare a 'temp' variable here.  There is a
> > variable of the same type and name declared at the top of the
> > function, and it is no longer being used by this point.
> 
> Er, perhaphs here.  In general, keeping declarations as local as
> possible is a good thing :-)

True, but in this case the new variable was shadowing a local variable
declared at the function scope.  Either it should have been given a
new name, or since it was just being used as a temporary placeholder
the function scoped variable should have been reused.

Cheers
        Nick


  reply	other threads:[~2002-01-10 16:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-09 15:00 Fred Fish
2002-01-09 15:31 ` Andrew Cagney
2002-01-10  3:28   ` Nick Clifton
2002-01-10  7:15     ` Andrew Cagney
2002-01-10  8:13       ` Nick Clifton [this message]
2002-01-10  3:29   ` ARM simulator maintainer Nick Clifton
2002-01-10  7:19     ` Andrew Cagney
2002-01-10  8:11       ` Nick Clifton
2002-01-10  8:31       ` Frank Ch. Eigler
2002-01-10 16:29         ` Andrew Cagney
2002-01-10 17:22           ` Frank Ch. Eigler
2002-01-10 17:34             ` Andrew Cagney
2002-01-10 17:53               ` Frank Ch. Eigler
2002-01-10 18:08                 ` Andrew Cagney
2002-01-11 10:31                   ` Frank Ch. Eigler
2002-01-11 11:06                     ` Andrew Cagney
2002-01-10  7:33 ` RFC: ARM simulator coredump Richard Earnshaw

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=m3bsg28a0u.fsf@north-pole.nickc.cambridge.redhat.com \
    --to=nickc@cambridge.redhat.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /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