diff options
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/readelf.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fb928075..238c4160 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-09-09 Chih-Hung Hsieh <[email protected]> + + * readelf.c (print_debug_exception_table): Initialize variable before + it is used, because compiler does not know that error never returns. + (dump_arhive_index): Likewise. + 2015-09-04 Chih-Hung Hsieh <[email protected]> * elflint.c (check_group): Replace %Z length modifier with %z. diff --git a/src/readelf.c b/src/readelf.c index 8e644003..33274f35 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -7910,6 +7910,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), dsize = 8; break; default: + dsize = 0; error (1, 0, gettext ("invalid TType encoding")); } @@ -9567,7 +9568,7 @@ dump_archive_index (Elf *elf, const char *fname) { as_off = s->as_off; - Elf *subelf; + Elf *subelf = NULL; if (unlikely (elf_rand (elf, as_off) == 0) || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) == NULL)) |