diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2015-11-03 13:33:13 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-11-03 13:33:13 -0500 |
commit | 04248ead1f57204119180022580626e31c165f60 (patch) | |
tree | a1e566b7a5593c5670a4ea2118a910749327e3c7 /gdb/gdbserver/linux-arm-low.c | |
parent | 04b3479c3f92e102c5a7d1158ab608e0015252c6 (diff) | |
download | gdb-04248ead1f57204119180022580626e31c165f60.zip gdb-04248ead1f57204119180022580626e31c165f60.tar.gz gdb-04248ead1f57204119180022580626e31c165f60.tar.bz2 |
gdbserver arm: Add casts
Trivial casts for C++.
Fixes things like
In file included from /home/simark/src/binutils-gdb/gdb/gdbserver/../common/common-defs.h:39:0,
from /home/simark/src/binutils-gdb/gdb/gdbserver/server.h:22,
from /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:19:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function ‘int arm_get_hwcap(long unsigned int*)’:
/home/simark/src/binutils-gdb/gdb/gdbserver/../../include/libiberty.h:711:38: error: invalid conversion from ‘void*’ to ‘unsigned char*’ [-fpermissive]
# define alloca(x) __builtin_alloca(x)
^
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:807:25: note: in expansion of macro ‘alloca’
unsigned char *data = alloca (8);
^
gdb/gdbserver/ChangeLog:
* linux-aarch32-low.c (arm_fill_gregset): Add cast.
(arm_store_gregset): Likewise.
* linux-arm-low.c (arm_get_hwcap): Likewise.
(arm_read_description): Likewise.
Diffstat (limited to 'gdb/gdbserver/linux-arm-low.c')
-rw-r--r-- | gdb/gdbserver/linux-arm-low.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index e10955f..ae659dd 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -804,7 +804,7 @@ arm_prepare_to_resume (struct lwp_info *lwp) static int arm_get_hwcap (unsigned long *valp) { - unsigned char *data = alloca (8); + unsigned char *data = (unsigned char *) alloca (8); int offset = 0; while ((*the_target->read_auxv) (offset, data, 8) == 8) @@ -855,7 +855,7 @@ arm_read_description (void) /* Now make sure that the kernel supports reading these registers. Support was added in 2.6.30. */ errno = 0; - buf = xmalloc (32 * 8 + 4); + buf = (char *) xmalloc (32 * 8 + 4); if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0 && errno == EIO) result = tdesc_arm; |