From: SeokYeon Hwang Date: Tue, 15 Jul 2014 07:05:28 +0000 (+0900) Subject: emulator: fix some compilation warnings on Windows X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~228^2^2~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F24473%2F5;p=sdk%2Femulator%2Fqemu.git emulator: fix some compilation warnings on Windows Fix compilation warnings -Wpointer-to-int-cast, -Wint-to-pointor-cast. Change-Id: I85d9063e7d89d88a27da7e90d76c1b8bd6a11fc8 Signed-off-by: SeokYeon Hwang --- diff --git a/exec.c b/exec.c index 346a196596..b6035d5399 100644 --- a/exec.c +++ b/exec.c @@ -1297,7 +1297,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, */ if (hax_enabled()) { int ret; - ret = hax_populate_ram((uint64_t)new_block->host, size); + ret = hax_populate_ram((uint64_t)(intptr_t)new_block->host, size); if (ret < 0) { fprintf(stderr, "Hax failed to populate ram\n"); exit(-1); diff --git a/target-i386/hax-darwin.c b/target-i386/hax-darwin.c index be889cd674..5339ce0b04 100644 --- a/target-i386/hax-darwin.c +++ b/target-i386/hax-darwin.c @@ -84,7 +84,7 @@ int hax_set_phys_mem(MemoryRegionSection *section) info.pa_start = start_addr; info.size = size; - info.va = (uint64_t)(memory_region_get_ram_ptr(mr) + section->offset_within_region); + info.va = (int64_t)(intptr_t)(memory_region_get_ram_ptr(mr) + section->offset_within_region); info.flags = memory_region_is_rom(mr) ? 1 : 0; ret = ioctl(hax_global.vm->fd, HAX_VM_IOCTL_SET_RAM, pinfo); @@ -248,8 +248,8 @@ int hax_host_setup_vcpu_channel(struct hax_vcpu_state *vcpu) return ret; } - vcpu->tunnel = (struct hax_tunnel *)(info.va); - vcpu->iobuf = (unsigned char *)(info.io_va); + vcpu->tunnel = (struct hax_tunnel *)(intptr_t)(info.va); + vcpu->iobuf = (unsigned char *)(intptr_t)(info.io_va); return 0; } diff --git a/target-i386/hax-windows.c b/target-i386/hax-windows.c index 10d49bcff7..d6f402a8ac 100644 --- a/target-i386/hax-windows.c +++ b/target-i386/hax-windows.c @@ -121,8 +121,8 @@ int hax_set_phys_mem(MemoryRegionSection *section) info.pa_start = start_addr; info.size = size; - info.va = (uint64_t)(memory_region_get_ram_ptr(mr) + - section->offset_within_region); + info.va = (uint64_t)(intptr_t)(memory_region_get_ram_ptr(mr) + + section->offset_within_region); info.flags = memory_region_is_rom(mr) ? 1 : 0; hDeviceVM = hax_global.vm->fd; @@ -357,8 +357,8 @@ int hax_host_setup_vcpu_channel(struct hax_vcpu_state *vcpu) ret = -EINVAL; return ret; } - vcpu->tunnel = (struct hax_tunnel *)(info.va); - vcpu->iobuf = (unsigned char *)(info.io_va); + vcpu->tunnel = (struct hax_tunnel *)(intptr_t)(info.va); + vcpu->iobuf = (unsigned char *)(intptr_t)(info.io_va); return 0; } diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index b942a1a8cd..471697421d 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -216,8 +216,6 @@ exec ./configure \ --enable-werror \ --extra-cflags=-Wno-error=format \ --extra-cflags=-Wno-error=format-extra-args \ - --extra-cflags=-Wno-error=pointer-to-int-cast \ - --extra-cflags=-Wno-error=int-to-pointer-cast \ --extra-ldflags=-Wl,--large-address-aware \ --cc=gcc \ --disable-coroutine-pool \