sparc64-tdep.c: Don't assign using memcpy return
This: valbuf = memcpy (buf, valbuf, len); causes a build failure in C++, because memcpy returns the value of "buf" as a void *. Instead of adding a cast, we can just do the assignment separately. gdb/ChangeLog: * sparc64-tdep.c (sparc64_store_arguments): Split assignment of valbuf.
This commit is contained in:
parent
ce746418ef
commit
cfcb22a541
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2015-10-24 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* sparc64-tdep.c (sparc64_store_arguments): Split assignment of
|
||||||
|
valbuf.
|
||||||
|
|
||||||
2015-10-24 Simon Marchi <simon.marchi@polymtl.ca>
|
2015-10-24 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* ia64-tdep.c (ia64_pseudo_register_write): Remove cast.
|
* ia64-tdep.c (ia64_pseudo_register_write): Remove cast.
|
||||||
|
|
|
@ -890,7 +890,8 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
|
||||||
/* Structure, Union or long double Complex arguments. */
|
/* Structure, Union or long double Complex arguments. */
|
||||||
gdb_assert (len <= 16);
|
gdb_assert (len <= 16);
|
||||||
memset (buf, 0, sizeof (buf));
|
memset (buf, 0, sizeof (buf));
|
||||||
valbuf = memcpy (buf, valbuf, len);
|
memcpy (buf, valbuf, len);
|
||||||
|
valbuf = buf;
|
||||||
|
|
||||||
if (element % 2 && sparc64_16_byte_align_p (type))
|
if (element % 2 && sparc64_16_byte_align_p (type))
|
||||||
element++;
|
element++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue