This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix uninitialised variable warning in ada-lang.c
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 31 May 2012 10:54:53 +0200
- Subject: Re: [RFA] Fix uninitialised variable warning in ada-lang.c
- References: <4FC72D04.5000704@arm.com>
On Thu, 31 May 2012 10:34:12 +0200, Matthew Gretton-Dann wrote:
> --- a/gdb/ada-lang.c
> +++ b/gdb/ada-lang.c
> @@ -4256,7 +4256,7 @@ static struct symbol *
> standard_lookup (const char *name, const struct block *block,
> domain_enum domain)
> {
> - struct symbol *sym;
> + struct symbol *sym = NULL;
OK for check-in but put there also the common GDB comment before:
/* Initialize it just to avoid a GCC false warning. */
>
> if (lookup_cached_symbol (name, domain, &sym, NULL))
> return sym;
Thanks,
Jan