[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 *'.
This commit is contained in:
Yao Qi 2016-10-24 10:59:11 +01:00
parent 638101973d
commit cb93dc7f26
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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 *'.
2016-10-10 Yao Qi <yao.qi@linaro.org>
* linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.

View File

@ -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++)