From: munkyu.im Date: Thu, 12 Sep 2013 08:12:24 +0000 (+0900) Subject: fix compilation error and some warnings X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~747 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=239cf25a178c286d5b48a000c39e080b3f12467d;p=sdk%2Femulator%2Fqemu.git fix compilation error and some warnings Change-Id: Icd02a6eff474b9f7bb8adf70e57ae7255cc61b5c Signed-off-by: munkyu.im --- diff --git a/target-i386/hax-darwin.c b/target-i386/hax-darwin.c index f8850aecd0..be889cd674 100644 --- a/target-i386/hax-darwin.c +++ b/target-i386/hax-darwin.c @@ -20,11 +20,11 @@ static char* qemu_strdup(const char *str) { - char *ptr; - size_t len = strlen(str); - ptr = g_malloc(len + 1); - memcpy(ptr, str, len+1); - return ptr; + char *ptr; + size_t len = strlen(str); + ptr = g_malloc(len + 1); + memcpy(ptr, str, len+1); + return ptr; } @@ -65,19 +65,19 @@ int hax_populate_ram(uint64_t va, uint32_t size) int hax_set_phys_mem(MemoryRegionSection *section) { - struct hax_set_ram_info info, *pinfo = &info; - MemoryRegionSection *mr = section->mr; + struct hax_set_ram_info info, *pinfo = &info; + MemoryRegion *mr = section->mr; hwaddr start_addr = section->offset_within_address_space; - ram_addr_t size = section->size; + ram_addr_t size = int128_get64(section->size); int ret; - /*We only care for the RAM and ROM*/ + /*We only care for the RAM and ROM*/ if(!memory_region_is_ram(mr)) - return 0; - + return 0; + if ( (start_addr & ~TARGET_PAGE_MASK) || (size & ~TARGET_PAGE_MASK)) { - dprint("set_phys_mem %x %lx requires page aligned addr and size\n", start_addr, size); + dprint("set_phys_mem %llx %lx requires page aligned addr and size\n", start_addr, size); exit(1); return -1; } diff --git a/tizen/src/ecs/ecs_msg.c b/tizen/src/ecs/ecs_msg.c index 06e6f2ce65..f4c88d93e5 100644 --- a/tizen/src/ecs/ecs_msg.c +++ b/tizen/src/ecs/ecs_msg.c @@ -131,7 +131,7 @@ bool msgproc_injector_req(ECS_Client* ccli, ECS__InjectorReq* msg) { const char* data = (const char*)msg->data.data; memcpy(sndbuf + 14, data, datalen); - LOG(">> print len = %d, data\" %s\"", strlen(data), data); + LOG(">> print len = %zd, data\" %s\"", strlen(data), data); } } @@ -198,11 +198,11 @@ bool msgproc_device_req(ECS_Client* ccli, ECS__DeviceReq* msg) } else if (!strncmp(cmd, MSG_TYPE_NFC, 3)) { if (group == MSG_GROUP_STATUS) { - send_to_nfc(request_get, data, length); + send_to_nfc(request_nfc_get, data, length); } else { - send_to_nfc(request_set, data, length); + send_to_nfc(request_nfc_set, data, length); } }