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:
Simon Marchi 2015-10-24 18:36:24 -04:00
parent ce746418ef
commit cfcb22a541
2 changed files with 7 additions and 1 deletions

View File

@ -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>
* ia64-tdep.c (ia64_pseudo_register_write): Remove cast.

View File

@ -890,7 +890,8 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
/* Structure, Union or long double Complex arguments. */
gdb_assert (len <= 16);
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))
element++;