From 9a5efed127ab39726fd38659b91387f56d58615f Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Thu, 10 Jul 2014 16:35:59 +0900 Subject: [PATCH] build: apply -Werror on MacOS Remove warnings on MacOS with clang. Apply -Werror on MacOS. We can't use "--enable-werror" option because "#pragma GCC diagnostic ..." is failed when configuring. Change-Id: Iab9b9ffec241a7120463957617cfa6e0dc0eb403 Signed-off-by: SeokYeon Hwang --- hw/9pfs/virtio-9p-local-maru.c | 6 ++---- target-i386/hax-all.c | 7 +++---- tizen/emulator_configure.sh | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/9pfs/virtio-9p-local-maru.c b/hw/9pfs/virtio-9p-local-maru.c index c7fa109..f893975 100644 --- a/hw/9pfs/virtio-9p-local-maru.c +++ b/hw/9pfs/virtio-9p-local-maru.c @@ -1634,13 +1634,13 @@ err_out: } #ifndef CONFIG_WIN32 +#ifdef FS_IOC_GETVERSION static int local_ioc_getversion(FsContext *ctx, V9fsPath *path, mode_t st_mode, uint64_t *st_gen) { TRACE("[%d][ Enter >> %s]\n", __LINE__, __func__); int err; -#ifdef FS_IOC_GETVERSION V9fsFidOpenState fid_open; /* @@ -1656,12 +1656,10 @@ static int local_ioc_getversion(FsContext *ctx, V9fsPath *path, } err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen); local_close(ctx, &fid_open); -#else - err = -ENOTTY; -#endif return err; } #endif +#endif static int local_init(FsContext *ctx) { diff --git a/target-i386/hax-all.c b/target-i386/hax-all.c index 9b9449f..12df8c1 100644 --- a/target-i386/hax-all.c +++ b/target-i386/hax-all.c @@ -82,7 +82,7 @@ static int hax_stop_tbloop(CPUArchState *env) { case HAX_EMULATE_STATE_MMIO: if (cpu->hax_vcpu->resync) { - hax_prepare_emulation(env); + hax_prepare_emulation(env); cpu->hax_vcpu->resync = 0; return 0; } @@ -458,7 +458,7 @@ int hax_pre_init(uint64_t ram_size) hax = &hax_global; memset(hax, 0, sizeof(struct hax_state)); hax->mem_quota = ram_size; - dprint("ram_size %lx\n", ram_size); + dprint("ram_size %llx\n", ram_size); return 0; } @@ -646,11 +646,10 @@ static int hax_vcpu_hax_exec(CPUArchState *env) if (hax_vcpu_emulation_mode(env)) { - dprint("Trying to vcpu execute at eip:%lx\n", env->eip); + dprint("Trying to vcpu execute at eip:%x\n", env->eip); return HAX_EMUL_EXITLOOP; } - //hax_cpu_synchronize_state(env); do { diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index 1cfd6b4..a3d9bb5 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -230,6 +230,7 @@ echo "" echo "##### QEMU configuring for emulator" echo "##### QEMU configure append:" $CONFIGURE_APPEND ./configure \ + --extra-cflags=-Werror \ --extra-cflags=-mmacosx-version-min=10.4 \ --audio-drv-list=coreaudio \ --enable-shm \ -- 2.7.4