diff options
author | Tom Tromey <tromey@adacore.com> | 2019-03-11 10:22:17 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-03-11 10:22:17 -0600 |
commit | 82cb27ff6b4e1ae811e72a02dddc3db4c9ff97b8 (patch) | |
tree | 64d9dd9c93392a65fd1dabccf6bef688bc1a05fd | |
parent | e7b681f1c62c2fa130adcc4a002f7185d33f7600 (diff) | |
download | gdb-82cb27ff6b4e1ae811e72a02dddc3db4c9ff97b8.zip gdb-82cb27ff6b4e1ae811e72a02dddc3db4c9ff97b8.tar.gz gdb-82cb27ff6b4e1ae811e72a02dddc3db4c9ff97b8.tar.bz2 |
Remove redundant assignment from dwarf2_find_containing_comp_unit
dwarf2_find_containing_comp_unit has two assignments to "this_cu" in
quick succession, both of which are just:
this_cu = dwarf2_per_objfile->all_comp_units[low];
... with no intervening assignments.
This patch removes the second assignment. I'm checking this in as
obvious. Tested on x86-64 Fedora 29.
gdb/ChangeLog
2019-03-11 Tom Tromey <tromey@adacore.com>
* dwarf2read.c (dwarf2_find_containing_comp_unit): Remove
redundant assignment to "this_cu".
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 63b8095..ee9fabe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-03-11 Tom Tromey <tromey@adacore.com> + + * dwarf2read.c (dwarf2_find_containing_comp_unit): Remove + redundant assignment to "this_cu". + 2019-03-08 Simon Marchi <simon.marchi@efficios.com> * gdbtypes.c (rank_one_type): Remove unnecessary cases from switch. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0c59dcd..7c07a10 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -25157,7 +25157,6 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off, } else { - this_cu = dwarf2_per_objfile->all_comp_units[low]; if (low == dwarf2_per_objfile->all_comp_units.size () - 1 && sect_off >= this_cu->sect_off + this_cu->length) error (_("invalid dwarf2 offset %s"), sect_offset_str (sect_off)); |