This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] arm-linux-nat.c: Add cast
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 3 Nov 2015 18:35:15 -0000
- Subject: [binutils-gdb] arm-linux-nat.c: Add cast
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f844cf0ec3887110375e9c1d4c48a68cb6a8b141
commit f844cf0ec3887110375e9c1d4c48a68cb6a8b141
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Tue Nov 3 13:33:14 2015 -0500
arm-linux-nat.c: Add cast
Fixes:
/home/simark/src/binutils-gdb/gdb/arm-linux-nat.c: In function â??const target_desc* arm_linux_read_description(target_ops*)â??:
/home/simark/src/binutils-gdb/gdb/../include/libiberty.h:711:38: error: invalid conversion from â??void*â?? to â??char*â?? [-fpermissive]
# define alloca(x) __builtin_alloca(x)
^
/home/simark/src/binutils-gdb/gdb/arm-linux-nat.c:578:13: note: in expansion of macro â??allocaâ??
buf = alloca (VFP_REGS_SIZE);
^
gdb/ChangeLog:
* arm-linux-nat.c (arm_linux_read_description): Add cast.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/arm-linux-nat.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7de4153..8cb45b8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
+ * arm-linux-nat.c (arm_linux_read_description): Add cast.
+
+2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
+
* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint): Change
type of rw to enum target_hw_bp_type.
(ppc_linux_remove_mask_watchpoint): Likewise.
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index a63b181..63fdae1 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -575,7 +575,7 @@ arm_linux_read_description (struct target_ops *ops)
registers. Support was added in 2.6.30. */
pid = ptid_get_lwp (inferior_ptid);
errno = 0;
- buf = alloca (VFP_REGS_SIZE);
+ buf = (char *) alloca (VFP_REGS_SIZE);
if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
&& errno == EIO)
result = NULL;