diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-09-14 03:01:48 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-09-14 03:01:48 +0000 |
commit | 6c4182ddc9e707f2bb12ee248458e3082ad28ce4 (patch) | |
tree | 33d4606309fdf64c2e9b46f8498a6241c49eaa44 | |
parent | 696576715e5355fa389275405e401115bc02089f (diff) | |
download | gdb-6c4182ddc9e707f2bb12ee248458e3082ad28ce4.zip gdb-6c4182ddc9e707f2bb12ee248458e3082ad28ce4.tar.gz gdb-6c4182ddc9e707f2bb12ee248458e3082ad28ce4.tar.bz2 |
* valops.c (value_assign): 'use_buffer' is initialized to zero,
and never assigned to. Delete it, and the 'if (use_buffer)'
clauses. Delete 'raw_buffer', since it is now unused.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/valops.c | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a832382..234e379 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -3,6 +3,10 @@ * valops.c (value_assign): Move 'buffer' to the enclosing block, so that its storage isn't referenced after its lifetime ends. + * valops.c (value_assign): 'use_buffer' is initialized to zero, + and never assigned to. Delete it, and the 'if (use_buffer)' + clauses. Delete 'raw_buffer', since it is now unused. + 2004-09-13 Andrew Cagney <cagney@gnu.org> * configure.in (frags): Replace TM_FILE with DEPRECATED_TM_FILE. diff --git a/gdb/valops.c b/gdb/valops.c index 6e825ac..575c9a3 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -525,8 +525,6 @@ value_assign (struct value *toval, struct value *fromval) { struct type *type; struct value *val; - char raw_buffer[MAX_REGISTER_SIZE]; - int use_buffer = 0; struct frame_id old_frame; if (!toval->modifiable) @@ -591,12 +589,6 @@ value_assign (struct value *toval, struct value *fromval) changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval); dest_buffer = buffer; } - else if (use_buffer) - { - changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval); - changed_len = use_buffer; - dest_buffer = raw_buffer; - } else { changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval); @@ -683,8 +675,6 @@ value_assign (struct value *toval, struct value *fromval) modify_field (buffer + byte_offset, value_as_long (fromval), VALUE_BITPOS (toval), VALUE_BITSIZE (toval)); - else if (use_buffer) - memcpy (buffer + VALUE_OFFSET (toval), raw_buffer, use_buffer); else memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval), TYPE_LENGTH (type)); |