aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2017-02-21 09:14:37 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2017-02-21 09:14:37 +0100
commit7814882a6534c100d8eba1a41588611a8b38c429 (patch)
treee5d32b4e944ff075070be1e3699b28f66b1e4881 /gdb/dwarf2read.c
parent24f1a75169e554d418be009d803a02e441584ea7 (diff)
downloadgdb-7814882a6534c100d8eba1a41588611a8b38c429.zip
gdb-7814882a6534c100d8eba1a41588611a8b38c429.tar.gz
gdb-7814882a6534c100d8eba1a41588611a8b38c429.tar.bz2
Fix recent compiler warnings.
gcc-4.8.5-11.el7.x86_64 dwarf2read.c: In function ‘pc_bounds_kind dwarf2_get_pc_bounds(die_info*, CORE_ADDR*, CORE_ADDR*, dwarf2_cu*, partial_symtab*)’: dwarf2read.c:12134:7: error: ‘range_end’ may be used uninitialized in this function [-Werror=maybe-uninitialized] dwarf2read.c:12133:7: error: ‘range_beginning’ may be used uninitialized in this function [-Werror=maybe-uninitialized] gdb/ChangeLog 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf2_rnglists_process: Initialize range_beginning and range_end.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index ae7d3f2..8a6e1f3 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -12030,7 +12030,8 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
while (1)
{
- CORE_ADDR range_beginning, range_end;
+ /* Initialize it due to a false compiler warning. */
+ CORE_ADDR range_beginning = 0, range_end = 0;
const gdb_byte *buf_end = (dwarf2_per_objfile->rnglists.buffer
+ dwarf2_per_objfile->rnglists.size);
unsigned int bytes_read;