diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-09-14 02:51:27 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-09-14 02:51:27 +0000 |
commit | 8430886c586682ee6713380adb66513c5b137aaa (patch) | |
tree | a4317ac4a17eb6d62f80d5432b4d72b7438ad5c2 /gdb/valops.c | |
parent | ac68a8d23022534ecc6c798fa5d3c4f857111827 (diff) | |
download | gdb-8430886c586682ee6713380adb66513c5b137aaa.tar.gz |
* valops.c (value_assign): Move 'buffer' to the enclosing block,
so that its storage isn't referenced after its lifetime ends.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index ac50d23b070..6e825ac382f 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -569,10 +569,10 @@ value_assign (struct value *toval, struct value *fromval) char *dest_buffer; CORE_ADDR changed_addr; int changed_len; + char buffer[sizeof (LONGEST)]; if (VALUE_BITSIZE (toval)) { - char buffer[sizeof (LONGEST)]; /* We assume that the argument to read_memory is in units of host chars. FIXME: Is that correct? */ changed_len = (VALUE_BITPOS (toval) |