blob: 3a42f0a770f516939a1a16cbbbb736a91565d6d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
From cb93dc7f262978bafe36397a41a56e409a302042 Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Mon, 24 Oct 2016 10:59:11 +0100
Subject: [PATCH] [GDBserver] Fix conversion warning
I got the following warning if I build GDBserver for aarch64_be-linux-gnu,
git/gdb/gdbserver/linux-aarch64-low.c:1539:39: error: invalid conversion from 'void*' to 'uint32_t* {aka unsigned int*}' [-fpermissive]
uint32_t *le_buf = xmalloc (byte_len);
^
The patch is to fix the warning.
gdb/gdbserver:
2016-10-24 Yao Qi <yao.qi@linaro.org>
PR server/20733
* linux-aarch64-low.c (append_insns): Cast the return value to
'uint32_t *'.
Upstream-status: Backport
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
gdb/gdbserver/linux-aarch64-low.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index e54a8ba..ae80cdd 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -1536,7 +1536,7 @@ append_insns (CORE_ADDR *to, size_t len, const uint32_t *buf)
{
size_t byte_len = len * sizeof (uint32_t);
#if (__BYTE_ORDER == __BIG_ENDIAN)
- uint32_t *le_buf = xmalloc (byte_len);
+ uint32_t *le_buf = (uint32_t *) xmalloc (byte_len);
size_t i;
for (i = 0; i < len; i++)
--
2.9.3
|