From acbd605ddd806554bacb62ce90f48517fb372f9b Mon Sep 17 00:00:00 2001 From: Matthew Gretton-Dann Date: Thu, 31 May 2012 09:34:40 +0000 Subject: [PATCH] * gdb/ada-lang.c (standard_lookup): Prevent uninitialized variable warning. --- gdb/ChangeLog | 5 +++++ gdb/ada-lang.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8a1b27ee4a9..c09c95431f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-05-31 Matthew Gretton-Dann + + * ada-lang.c (standard_lookup): Prevent uninitialized variable + warning. + 2012-05-30 Jeff Kenton * configure.host (gdb_host_cpu): Handle tilegx*. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 1fac31656fe..af0fdb5e53f 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -4256,7 +4256,8 @@ static struct symbol * standard_lookup (const char *name, const struct block *block, domain_enum domain) { - struct symbol *sym; + /* Initialize it just to avoid a GCC false warning. */ + struct symbol *sym = NULL; if (lookup_cached_symbol (name, domain, &sym, NULL)) return sym; -- 2.30.2