diff options
author | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2018-08-07 22:39:23 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2018-08-07 22:40:33 -0700 |
commit | f6f9ed015ea683ee2b00591aa31a4cacedb7a810 (patch) | |
tree | b30b19f3ec5dd0b685538566d20f775451d5f98c /gold/object.cc | |
parent | a9fc784bacd65a47c0d524c4a048453d1d32d765 (diff) | |
download | gdb-f6f9ed015ea683ee2b00591aa31a4cacedb7a810.zip gdb-f6f9ed015ea683ee2b00591aa31a4cacedb7a810.tar.gz gdb-f6f9ed015ea683ee2b00591aa31a4cacedb7a810.tar.bz2 |
Fix "may be used uninitialized" warning.
* object.cc (Sized_relobj_file::map_to_kept_section): Initialize
kept_file.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/object.cc b/gold/object.cc index 084212c..cbeddb9 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -2951,7 +2951,7 @@ Sized_relobj_file<size, big_endian>::map_to_kept_section( // Since we're using this mapping for relocation processing, // we don't want to match sections unless they have the same // size. - uint64_t kept_size; + uint64_t kept_size = 0; if (kept_section->find_comdat_section(section_name, &kept_shndx, &kept_size)) { @@ -2961,7 +2961,7 @@ Sized_relobj_file<size, big_endian>::map_to_kept_section( } else { - uint64_t kept_size; + uint64_t kept_size = 0; if (kept_section->find_single_comdat_section(&kept_shndx, &kept_size) && sh_size == kept_size) |