summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-09-29 20:56:45 +0200
committerAnthony Liguori <aliguori@amazon.com>2013-10-14 08:50:34 -0700
commit575ddeb459f622a114cbfe37d220c0519ec9c2a4 (patch)
tree3f980c78c7c91f3639ac2930273bbb377a31d627 /exec.c
parent1cdae4573d7613149348d834c605bfbe3c7d405b (diff)
downloadqemu-575ddeb459f622a114cbfe37d220c0519ec9c2a4.tar.gz
qemu-575ddeb459f622a114cbfe37d220c0519ec9c2a4.tar.bz2
qemu-575ddeb459f622a114cbfe37d220c0519ec9c2a4.zip
exec: Fix prototype of phys_mem_set_alloc and related functions
phys_mem_alloc and its assigned values qemu_anon_ram_alloc and legacy_s390_alloc must have identical argument lists. legacy_s390_alloc uses the size parameter to call mmap, so size_t is good enough for all of them. This patch fixes compiler errors on i686 Linux hosts: CC alpha-softmmu/exec.o exec.c:752:51: error: initialization from incompatible pointer type [-Werror] exec.c: In function 'qemu_ram_alloc_from_ptr': exec.c:1139:32: error: comparison of distinct pointer types lacks a cast [-Werror] exec.c: In function 'qemu_ram_remap': exec.c:1283:21: error: comparison of distinct pointer types lacks a cast [-Werror] Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1380481005-32399-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index 35ce8329e1..bea2cffd94 100644
--- a/exec.c
+++ b/exec.c
@@ -717,14 +717,14 @@ static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end,
uint16_t section);
static subpage_t *subpage_init(AddressSpace *as, hwaddr base);
-static void *(*phys_mem_alloc)(ram_addr_t size) = qemu_anon_ram_alloc;
+static void *(*phys_mem_alloc)(size_t size) = qemu_anon_ram_alloc;
/*
* Set a custom physical guest memory alloator.
* Accelerators with unusual needs may need this. Hopefully, we can
* get rid of it eventually.
*/
-void phys_mem_set_alloc(void *(*alloc)(ram_addr_t))
+void phys_mem_set_alloc(void *(*alloc)(size_t))
{
phys_mem_alloc = alloc;
}