This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH c++ 08/12] arm-linux-nat.c: Add cast


From: Simon Marchi <simon.marchi@polymtl.ca>

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.
---
 gdb/arm-linux-nat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.5.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]