diff options
author | Tom Tromey <tom@tromey.com> | 2016-06-06 14:18:23 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2016-07-14 10:35:40 -0600 |
commit | ac29888840f025448225e600d4cf99e126386878 (patch) | |
tree | 8c92ab02d4267d9a81cff5b770f24fb6f222b231 /gdb/dwarf2read.c | |
parent | 764c99c18adcdf658b390f25940aed7713a6a769 (diff) | |
download | gdb-ac29888840f025448225e600d4cf99e126386878.zip gdb-ac29888840f025448225e600d4cf99e126386878.tar.gz gdb-ac29888840f025448225e600d4cf99e126386878.tar.bz2 |
Remove some variables but call functions for side effects
This patch consolidates the (possibly-questionable) spots where we
remove a declaration but continue to call some function for side
effects. In a couple of cases it wasn't entirely clear to me that
this mattered; and in some other cases it might be more aesthetically
pleasing to use ATTRIBUTE_UNUSED. So, I broke this out into a
separate patch for simpler review.
2016-07-14 Tom Tromey <tom@tromey.com>
* arch-utils.c (default_skip_permanent_breakpoint): Remove
"bp_insn".
* disasm.c (do_assembly_only): Remove "num_displayed".
* dwarf2read.c (read_abbrev_offset): Remove "length".
(dwarf_decode_macro_bytes) <DW_MACINFO_vendor_ext>: Remove
"constant".
* m32c-tdep.c (make_regs): Remove "r2hl", "r3hl", and "intbhl".
* microblaze-tdep.c (microblaze_frame_cache): Remove "func".
* tracefile.c (trace_save): Remove "status".
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6658a38..58b502b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4497,12 +4497,12 @@ read_abbrev_offset (struct dwarf2_section_info *section, { bfd *abfd = get_section_bfd_owner (section); const gdb_byte *info_ptr; - unsigned int length, initial_length_size, offset_size; + unsigned int initial_length_size, offset_size; sect_offset abbrev_offset; dwarf2_read_section (dwarf2_per_objfile->objfile, section); info_ptr = section->buffer + offset.sect_off; - length = read_initial_length (abfd, info_ptr, &initial_length_size); + read_initial_length (abfd, info_ptr, &initial_length_size); offset_size = initial_length_size == 4 ? 4 : 8; info_ptr += initial_length_size + 2 /*version*/; abbrev_offset.sect_off = read_offset_1 (abfd, info_ptr, offset_size); @@ -21578,9 +21578,10 @@ dwarf_decode_macro_bytes (bfd *abfd, if (!section_is_gnu) { unsigned int bytes_read; - int constant; - constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + /* This reads the constant, but since we don't recognize + any vendor extensions, we ignore it. */ + read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); mac_ptr += bytes_read; read_direct_string (abfd, mac_ptr, &bytes_read); mac_ptr += bytes_read; |