This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Add 'static' keyword
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: "Jim Blandy" <jimb at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Oct 2006 00:54:16 +0200 (CEST)
- Subject: Re: PATCH: Add 'static' keyword
- References: <m3vem8dr1h.fsf@codesourcery.com>
- Reply-to: muller at ics dot u-strasbg dot fr
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 <jimb@codesourcery.com>
>
> * 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