+2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
+ (write_pieced_value): Likewise.
+
2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
* dwarf2loc.c (write_pieced_value): When writing to a bit-field,
gdb_byte *contents;
struct piece_closure *c
= (struct piece_closure *) value_computed_closure (v);
- size_t buffer_size = 0;
std::vector<gdb_byte> buffer;
int bits_big_endian
= gdbarch_bits_big_endian (get_type_arch (value_type (v)));
this_size_bits = max_offset - offset;
this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8;
+ buffer.reserve (this_size);
source_offset = source_offset_bits / 8;
- if (buffer_size < this_size)
- {
- buffer_size = this_size;
- buffer.reserve (buffer_size);
- }
intermediate_buffer = buffer.data ();
/* Copy from the source to DEST_BUFFER. */
const gdb_byte *contents;
struct piece_closure *c
= (struct piece_closure *) value_computed_closure (to);
- size_t buffer_size = 0;
std::vector<gdb_byte> buffer;
int bits_big_endian
= gdbarch_bits_big_endian (get_type_arch (value_type (to)));
}
else
{
- if (buffer_size < this_size)
- {
- buffer_size = this_size;
- buffer.reserve (buffer_size);
- }
+ buffer.reserve (this_size);
source_buffer = buffer.data ();
need_bitwise = 1;
}