gold: Move sym declaration just before use
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 19 Dec 2020 21:30:39 +0000 (13:30 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 19 Dec 2020 21:37:04 +0000 (13:37 -0800)
commit97aac4ec3293dc4a3fdb45a744a2991ae56514c2
tree5d001c56054449c969d72d4c7dc770fd5cd2c14e
parent60108e47b5b16b32a62eb32c5e6f929ab2cb5cf1
gold: Move sym declaration just before use

Move sym declaration just before use to avoid -Wmaybe-uninitialized
warning from GCC 11.

PR gold/27097
* incremental.cc (Sized_relobj_incr::do_add_symbols): Move sym
declaration just before use.
(Sized_incr_dynobj::do_add_symbols): Likewise.
* plugin.cc (Sized_pluginobj::do_add_symbols): Likewise.
gold/ChangeLog
gold/incremental.cc
gold/plugin.cc