emulator: Fix compilation warnings.
authorKitae Kim <kt920.kim@samsung.com>
Fri, 11 Jan 2013 10:50:52 +0000 (19:50 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Fri, 11 Jan 2013 10:54:26 +0000 (19:54 +0900)
added function declarations missing and removed unused variables.

Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
tizen/src/emulator.c
tizen/src/skin/maruskin_client.c
tizen/src/skin/maruskin_keymap.c
tizen/src/skin/maruskin_server.c

index 785845babd0e76ca229774e178fbd009ba1ea301..eca27748070ff693eb1582e49bfad29c3c1d6d5a 100644 (file)
@@ -316,7 +316,9 @@ static void parse_options(int argc, char *argv[], int *skin_argc,
 
 static char *set_bin_dir(char *exec_argv)
 {
+#ifndef CONFIG_DARWIN
     char link_path[1024] = { 0, };
+#endif
     char *file_name = NULL;
 
 #if defined(CONFIG_WIN32)
@@ -582,7 +584,7 @@ int qemu_main(int argc, char **argv, char **envp);
 
 static int emulator_main(int argc, char *argv[])
 {
-    parse_options(argc, argv, &_skin_argc, 
+    parse_options(argc, argv, &_skin_argc,
                 &_skin_argv, &_qemu_argc, &_qemu_argv);
     set_bin_dir(_qemu_argv[0]);
     socket_init();
@@ -633,7 +635,7 @@ int main(int argc, char *argv[])
 #else
 int g_argc;
 
-void* main_thread(void* args)
+static void* main_thread(void* args)
 {
     char** argv;
     int argc = g_argc;
index c61e297ceafc0e16af7bd4769fd20a6cd786d96c..d7e09d7048fda7bc4d7d28bcd4d8c8bf9b9fa1fc 100644 (file)
@@ -39,6 +39,8 @@
 #include "emulator.h"
 #include "sdb.h"
 #include "debug_ch.h"
+#include "emul_state.h"
+#include "maruskin_operation.h"
 
 #ifdef CONFIG_WIN32
 #include "maru_err_table.h"
@@ -137,7 +139,7 @@ static void* run_skin_client(void* arg)
         OPT_UID, uid,
         OPT_VM_PATH, vm_path,
         OPT_NET_BASE_PORT, tizen_base_port,
-        OPT_MAX_TOUCHPOINT, maxtouchpoint, 
+        OPT_MAX_TOUCHPOINT, maxtouchpoint,
         argv );
 #else
     int len = strlen(JAVA_EXEFILE_PATH) + strlen(JAVA_EXEOPTION) +
@@ -157,7 +159,7 @@ static void* run_skin_client(void* arg)
         OPT_UID, uid,
         OPT_VM_PATH, vm_path,
         OPT_NET_BASE_PORT, tizen_base_port,
-        OPT_MAX_TOUCHPOINT, maxtouchpoint, 
+        OPT_MAX_TOUCHPOINT, maxtouchpoint,
         argv );
 #endif
 
index 5a3e11c80eb876c2506606e22220c41a8bdb239e..29d7ca302d5480fb00a679d939d3c39419fe129f 100644 (file)
@@ -27,7 +27,6 @@
  *
  */
 
-
 #include "maruskin_keymap.h"
 #include "emul_state.h"
 #include "console.h"
@@ -35,7 +34,7 @@
 
 MULTI_DEBUG_CHANNEL(qemu, skin_keymap);
 
-
+#ifdef KEYMAP_DEBUG
 static void trace_binary(int decimal)
 {
     if (decimal != 0) {
@@ -44,6 +43,7 @@ static void trace_binary(int decimal)
         fflush(stdout);
     }
 }
+#endif
 
 int javakeycode_to_scancode(
     int event_type, int java_keycode, int state_mask, int key_location)
@@ -51,7 +51,7 @@ int javakeycode_to_scancode(
     bool character = true;
     int vk = 0;
 
-#if 0
+#ifdef KEYMAP_DEBUG
     /* print key information */
     TRACE("keycode = %d(", java_keycode);
     trace_binary(java_keycode);
@@ -226,7 +226,6 @@ int javakeycode_to_scancode(
                 case JAVA_KEY_KEYPAD_CR : /* KP_ENTER */
                     kbd_put_keycode(224);
                     return 28;
                 case JAVA_KEY_SCROLL_LOCK :
                     return 70;
                 case JAVA_KEY_PAUSE :
index 260fc893dc887417c14db1e3edf40152c6d47b20..699ba177b864cac8d50680dbc82c778a9b0f191b 100644 (file)
@@ -315,9 +315,7 @@ void notify_booting_progress(int progress_value)
         len = 1;
     } else if (progress_value < 100) {
         len = 2;
-    } else if (progress_value = 100) {
-        len = 3;
-    } else if (progress_value > 100) {
+    } else {
         progress_value = 100;
         len = 3;
     }
@@ -327,7 +325,7 @@ void notify_booting_progress(int progress_value)
 
     if (client_sock) {
         if (0 > send_skin_data(client_sock,
-            SEND_BOOTING_PROGRESS, progress_data, len + 1, 1)) {
+            SEND_BOOTING_PROGRESS, (unsigned char *)progress_data, len + 1, 1)) {
 
             ERR("fail to send SEND_BOOTING_PROGRESS to skin.\n");
         }