From d2a27c7d96e340dec7c375cd469e9d04b28d0b64 Mon Sep 17 00:00:00 2001 From: Mario Werner Date: Wed, 3 Dec 2014 09:45:21 +0100 Subject: [PATCH] initialized a few variables to silence warnings when building with Wall --- elfio/elfio_dump.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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() );