From 575ddeb459f622a114cbfe37d220c0519ec9c2a4 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 29 Sep 2013 20:56:45 +0200 Subject: 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 Reviewed-by: Markus Armbruster Message-id: 1380481005-32399-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori --- include/exec/exec-all.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/exec') diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 6ad05cacf5..ea90b649d4 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -322,7 +322,7 @@ extern uintptr_t tci_tb_ptr; #if !defined(CONFIG_USER_ONLY) -void phys_mem_set_alloc(void *(*alloc)(ram_addr_t)); +void phys_mem_set_alloc(void *(*alloc)(size_t)); struct MemoryRegion *iotlb_to_region(hwaddr index); bool io_mem_read(struct MemoryRegion *mr, hwaddr addr, -- cgit 1.4.1