This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix uninitialised variable warning in ada-lang.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]