diff --git a/elfio/elfio_dump.hpp b/elfio/elfio_dump.hpp index 0329f0a..66c0804 100644 --- a/elfio/elfio_dump.hpp +++ b/elfio/elfio_dump.hpp @@ -606,12 +606,12 @@ class dump } for ( Elf_Xword i = 0; i < sym_no; ++i ) { std::string name; - Elf64_Addr value; - Elf_Xword size; - unsigned char bind; - unsigned char type; - Elf_Half section; - unsigned char other; + Elf64_Addr value = 0; + Elf_Xword size = 0; + unsigned char bind = 0; + unsigned char type = 0; + Elf_Half section = 0; + unsigned char other = 0; symbols.get_symbol( i, name, value, size, bind, type, section, other ); symbol_table( out, i, name, value, size, bind, type, section, reader.get_class() ); } @@ -728,8 +728,8 @@ class dump out << "Dynamic section (" << sec->get_name() << ")" << std::endl; out << "[ Nr ] Tag Name/Value" << std::endl; for ( Elf_Xword i = 0; i < dyn_no; ++i ) { - Elf_Xword tag; - Elf_Xword value; + Elf_Xword tag = 0; + Elf_Xword value = 0; std::string str; dynamic.get_entry( i, tag, value, str ); dynamic_tag( out, i, tag, value, str, reader.get_class() );