From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16898 invoked by alias); 10 Jan 2002 16:13:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16811 invoked from network); 10 Jan 2002 16:13:08 -0000 Received: from unknown (HELO dell-pe2450-3.cambridge.redhat.com) (195.224.55.225) by sources.redhat.com with SMTP; 10 Jan 2002 16:13:08 -0000 Received: from north-pole.nickc.cambridge.redhat.com (host217-35-40-66.in-addr.btopenworld.com [217.35.40.66]) by dell-pe2450-3.cambridge.redhat.com (Postfix) with ESMTP id 3E0CE850FE; Thu, 10 Jan 2002 16:13:07 +0000 (GMT) Received: from north-pole.nickc.cambridge.redhat.com.nickc.cambridge.redhat.com (localhost [127.0.0.1]) by north-pole.nickc.cambridge.redhat.com (Postfix) with ESMTP id 445E31118E7; Thu, 10 Jan 2002 16:07:29 +0000 (GMT) To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: ARM simulator coredump References: <200201092258.g09MwlU26601@fred.ninemoons.com> <3C3CD2BA.30209@cygnus.com> <3C3DB00F.6050605@cygnus.com> From: Nick Clifton Date: Thu, 10 Jan 2002 08:13:00 -0000 In-Reply-To: <3C3DB00F.6050605@cygnus.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-01/txt/msg00231.txt.bz2 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