fix compilation error and some warnings
authormunkyu.im <munkyu.im@samsung.com>
Thu, 12 Sep 2013 08:12:24 +0000 (17:12 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Thu, 12 Sep 2013 08:36:48 +0000 (17:36 +0900)
Change-Id: Icd02a6eff474b9f7bb8adf70e57ae7255cc61b5c
Signed-off-by: munkyu.im <munkyu.im@samsung.com>
target-i386/hax-darwin.c
tizen/src/ecs/ecs_msg.c

index f8850aecd0f7eef921fdd2763370b38fcb58960f..be889cd674eacb011c9399cfd2013805afb99919 100644 (file)
 
 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;
     }
index 06e6f2ce65ac6c8975ee0372e2b7e78d0f10529c..f4c88d93e5cd1b8c676b2246af75f3a2d154e9b4 100644 (file)
@@ -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);
         }
     }