Fix build error due to uninitialized variable warning
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 3 Aug 2015 12:35:58 +0000 (14:35 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 3 Aug 2015 12:35:58 +0000 (14:35 +0200)
commit1da03605ced73fc20f40ad649f3038e654d36dee
treef8a3edff82b5eabf43f7ef32d49f5d29c5dee7a3
parent8156fe7f47884390b7404af15903795bb607658b
Fix build error due to uninitialized variable warning

As of commit a5fdf78a4402341a0ae23a5ca8a63825e2b5286c, building GDB with
a GCC 4.1 host compiler fails with:

gdb/cp-namespace.c: In function 'cp_lookup_symbol_via_imports':
gdb/cp-namespace.c:482: warning: 'sym.block' may be used uninitialized in this function

Apparently, more recent compilers are able to deduce that no actual
uninitialized use of sym.block takes place, but GCC 4.1 isn't yet
able to do that.

Fixed by adding an explicit initalization.

gdb/
* cp-namespace.c (cp_lookup_symbol_via_imports): Fix uninitialized
variable warning with some compilers.
gdb/ChangeLog
gdb/cp-namespace.c