aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-02-26 07:46:40 +0100
committerTom de Vries <tdevries@suse.de>2025-02-26 07:46:40 +0100
commit6c6080171fc877e461da0f6df23a9c36a984ca55 (patch)
tree4c119e75833d232a48bce3f3c4addb660c81af37
parent2f0521c0d6f6ea6fecef96cf825656263abb570d (diff)
downloadbinutils-6c6080171fc877e461da0f6df23a9c36a984ca55.zip
binutils-6c6080171fc877e461da0f6df23a9c36a984ca55.tar.gz
binutils-6c6080171fc877e461da0f6df23a9c36a984ca55.tar.bz2
[gdb/build] Fix unused var in dwarf2/read.c
On x86_64-linux, with gcc 7.5.0 I ran into a build breaker: ... gdb/dwarf2/read.c: In function ‘void read_comp_units_from_section()’: gdb/dwarf2/read.c:4297:31: error: unused variable ‘sig_type_it’ \ [-Werror=unused-variable] auto [sig_type_it, inserted] = sig_types.emplace (sig_ptr); ^ ... Fix this by dropping the unused variable. Tested on x86_64-linux, by completing a build.
-rw-r--r--gdb/dwarf2/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index e044d1e..b4fd7e3 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -4294,7 +4294,7 @@ read_comp_units_from_section (dwarf2_per_objfile *per_objfile,
sig_type->type_offset_in_tu = cu_header.type_cu_offset_in_tu;
this_cu.reset (sig_type.release ());
- auto [sig_type_it, inserted] = sig_types.emplace (sig_ptr);
+ auto inserted = sig_types.emplace (sig_ptr).second;
if (!inserted)
complaint (_("debug type entry at offset %s is duplicate to"