Remove redundant assignment from dwarf2_find_containing_comp_unit
authorTom Tromey <tromey@adacore.com>
Mon, 11 Mar 2019 16:22:17 +0000 (10:22 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 11 Mar 2019 16:22:17 +0000 (10:22 -0600)
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".

gdb/ChangeLog
gdb/dwarf2read.c

index 63b8095d99366ef50954f9a2d2432770ab3c9bc1..ee9fabecf0f1721653da7ae88c4e9a9ab766cc51 100644 (file)
@@ -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.
index 0c59dcd20427fb56da99d6e382e151918d42d1ac..7c07a10e8c06d83bf52b4fd5f0acb0df0f433056 100644 (file)
@@ -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));