From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28901 invoked by alias); 25 Oct 2006 22:54:48 -0000 Received: (qmail 28884 invoked by uid 22791); 25 Oct 2006 22:54:46 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Oct 2006 22:54:43 +0000 Received: from websd.u-strasbg.fr (websd.u-strasbg.fr [130.79.112.253]) by ics.u-strasbg.fr (Postfix) with ESMTP id 671F118701D; Thu, 26 Oct 2006 00:58:29 +0200 (CEST) Received: from 57.67.16.50 (SquirrelMail authenticated user muller) by websd.u-strasbg.fr with HTTP; Thu, 26 Oct 2006 00:54:16 +0200 (CEST) Message-ID: <17854.57.67.16.50.1161816856.squirrel@websd.u-strasbg.fr> In-Reply-To: References: Date: Wed, 25 Oct 2006 22:54:00 -0000 Subject: Re: PATCH: Add 'static' keyword From: "Pierre Muller" To: "Jim Blandy" Cc: gdb-patches@sourceware.org Reply-To: muller@ics.u-strasbg.fr User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00278.txt.bz2 The problem is that I am not really a confirmed C code writer, I basically started C programming to add pascal language support in GDB. The same kind of error could be repeated in several other locations, I did not even think that it was a good practice to repeat 'static' in the implementation. Don't hesitate to correct others. Pierre Muller On Wed, October 25, 2006 23:27, Jim Blandy said: > > It's helpful when reading code to be able to see that a function is > static simply looking at its definition. > > Committed as obvious. > > gdb/ChangeLog: > 2006-10-25 Jim Blandy > > * p-valprint.c (pascal_object_print_value): Add 'static' keyword > to function definition, to match declaration earlier in file. > > Index: gdb/p-valprint.c > =================================================================== > RCS file: /cvs/src/src/gdb/p-valprint.c,v > retrieving revision 1.41 > diff -u -r1.41 p-valprint.c > --- gdb/p-valprint.c 18 Jan 2006 21:24:19 -0000 1.41 > +++ gdb/p-valprint.c 25 Oct 2006 21:25:22 -0000 > @@ -915,7 +915,7 @@ > /* Special val_print routine to avoid printing multiple copies of virtual > baseclasses. */ > > -void > +static void > pascal_object_print_value (struct type *type, const gdb_byte *valaddr, > CORE_ADDR address, struct ui_file *stream, > int format, int recurse, > Pierre Muller Institut Charles Sadron aux Etats-Unis jusqu'à fin octobre 2006