From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11107 invoked by alias); 3 Jan 2004 15:18:13 -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 11091 invoked from network); 3 Jan 2004 15:18:12 -0000 Received: from unknown (HELO mwinf0304.wanadoo.fr) (193.252.22.28) by sources.redhat.com with SMTP; 3 Jan 2004 15:18:12 -0000 Received: from takamaka.act-europe.fr (AStDenis-103-1-2-242.w81-249.abo.wanadoo.fr [81.249.112.242]) by mwinf0304.wanadoo.fr (SMTP Server) with ESMTP id 71AF1A803FB8; Sat, 3 Jan 2004 16:18:11 +0100 (CET) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5DA8047D62; Sat, 3 Jan 2004 19:18:08 +0400 (RET) Date: Sat, 03 Jan 2004 15:18:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: ac131313@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] infrun.c:handle_inferior_event() tiny simplification (was "Re: [RFA/patch] handle_inferior_event() extract some code into a separate function") Message-ID: <20040103151808.GZ820@gnat.com> References: <20031219144323.GL826@gnat.com> <3FF59C76.3000902@gnu.org> <20040103115203.GU820@gnat.com> <200401031251.i03CpAwn025849@elgar.kettenis.dyndns.org> <20040103150107.GY820@gnat.com> <200401031509.i03F9BXD026205@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401031509.i03F9BXD026205@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.4i X-SW-Source: 2004-01/txt/msg00055.txt.bz2 > Here is what I suggest: > > 1. A patch to makes it more obvious that this variable is only > locally used by defining it only inside these if blocks. > Patch attached. > > 2. Send an updated version of the patch I backed out where > real_stop_pc is local variable to the new function, rather > than a parameter (that was completely foolish since we don't > even use the value that was passed and was not set in any case) > > Here is the first patch: > > 2004-01-03 J. Brobecker > > * infrun.c (handle_inferior_event): Move the declaration of > real_stop_pc inside the if blocks where it is used. > > OK to apply? Tested on x86-linux with GCC 3.2.3, no warning, and > no regression. > > Sounds great to me. Consider the other patch pre-approved. Thanks a lot. The first one has just been committed. The second one is coming soon. -- Joel