diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2015-10-24 18:36:24 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2015-10-24 18:36:24 -0400 |
commit | cfcb22a541ab8f783bf667cf7afbbfd9cd243cce (patch) | |
tree | 649f65bc47ef2378c2081beb2491ee258a72c801 /gdb/sparc64-tdep.c | |
parent | ce746418ef15c5a47b9ab17c249ba5f7c273db4a (diff) | |
download | gdb-cfcb22a541ab8f783bf667cf7afbbfd9cd243cce.zip gdb-cfcb22a541ab8f783bf667cf7afbbfd9cd243cce.tar.gz gdb-cfcb22a541ab8f783bf667cf7afbbfd9cd243cce.tar.bz2 |
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.
Diffstat (limited to 'gdb/sparc64-tdep.c')
-rw-r--r-- | gdb/sparc64-tdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 4c05277..a23740e 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -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++; |