[nios2] Add type casts to nios2_fill/store_gregset
Commit Message
Hi Yao,
This fixes the nios2 gdbserver build; the C++ compiler was complaining
about pointer type mismatches. Is this okay to commit?
Thanks,
Chung-Lin
2016-07-08 Chung-Lin Tang <cltang@codesourcery.com>
gdbserver/
* linux-nios2-low.c (nios2_fill_gregset): Add type cast
to buf parameter.
(nios2_store_gregset): Likewise.
Comments
Hi Chung-Lin,
On Fri, Jul 8, 2016 at 10:47 AM, Chung-Lin Tang <cltang@codesourcery.com> wrote:
> Hi Yao,
> This fixes the nios2 gdbserver build; the C++ compiler was complaining
> about pointer type mismatches. Is this okay to commit?
Yes, the patch is good to me.
@@ -183,7 +183,7 @@ nios2_supply_register (struct regcache *regcache, int regno,
static void
nios2_fill_gregset (struct regcache *regcache, void *buf)
{
- union nios2_register *regset = buf;
+ union nios2_register *regset = (union nios2_register *) buf;
int i;
for (i = 1; i < nios2_num_regs; i++)
@@ -193,7 +193,7 @@ nios2_fill_gregset (struct regcache *regcache, void *buf)
static void
nios2_store_gregset (struct regcache *regcache, const void *buf)
{
- const union nios2_register *regset = buf;
+ const union nios2_register *regset = (union nios2_register *) buf;
int i;
for (i = 0; i < nios2_num_regs; i++)