diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-07-08 09:44:04 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-18 06:03:25 +0200 |
commit | cb85f7ab045e8c05ee182b3573c9aba8e287e36b (patch) | |
tree | 9aacb41f4cf3a3551a2564026ea7f3f92d175845 /exec.c | |
parent | 6453a3a69488196f26d12654c6b148446abdf3d6 (diff) | |
download | qemu-cb85f7ab045e8c05ee182b3573c9aba8e287e36b.tar.gz qemu-cb85f7ab045e8c05ee182b3573c9aba8e287e36b.tar.bz2 qemu-cb85f7ab045e8c05ee182b3573c9aba8e287e36b.zip |
exec.c: Pass correct pointer type to qemu_ram_ptr_length
Commit e3127ae0 introduced a problem where we're passing a
hwaddr* to qemu_ram_ptr_length() but it wants a ram_addr_t*;
this will cause problems on 32 bit hosts and in any case
provokes a clang warning on MacOSX:
CC arm-softmmu/exec.o
exec.c:2164:46: warning: incompatible pointer types passing 'hwaddr *'
(aka 'unsigned long long *') to parameter of type 'ram_addr_t *'
(aka 'unsigned long *')
[-Wincompatible-pointer-types]
return qemu_ram_ptr_length(raddr + base, plen);
^~~~
exec.c:1392:63: note: passing argument to parameter 'size' here
static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size)
^
Since this function is only used in one place, change its
prototype to pass a hwaddr* rather than a ram_addr_t*,
rather than contorting the calling code to get the type right.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Riku Voipio <riku.voipio@linaro.org>
Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1379,7 +1379,7 @@ static void *qemu_safe_ram_ptr(ram_addr_t addr) /* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr * but takes a size argument */ -static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size) +static void *qemu_ram_ptr_length(ram_addr_t addr, hwaddr *size) { if (*size == 0) { return NULL; |