Fix code warning.

Change-Id: Ib11fb49f528d3688351ae349d5b4e307c28b3967
diff --git a/mbtk/mbtk_rild/src/main.c b/mbtk/mbtk_rild/src/main.c
old mode 100644
new mode 100755
index 8df913b..afff8d5
--- a/mbtk/mbtk_rild/src/main.c
+++ b/mbtk/mbtk_rild/src/main.c
@@ -27,12 +27,14 @@
 #include "info_data.h"

 #include "mbtk_led.h"

 

+#ifndef TEMP_FAILURE_RETRY

 #define TEMP_FAILURE_RETRY(exp) ({         \

     typeof (exp) _rc;                      \

     do {                                   \

         _rc = (exp);                       \

     } while (_rc == -1 && errno == EINTR); \

     _rc; })

+#endif

 

 #define BUFFER_SIZE 2048

 #define UEVENT_USIM_DEV "/devices/virtual/usim_event/usim0"

@@ -58,7 +60,7 @@
 static bool is_first_boot = FALSE;

 

 void setRadioPower(int isOn);

-int urc_msg_distribute(bool async_process, info_urc_msg_id_enum msg, void *data, int data_len);

+int urc_msg_distribute(bool async_process, info_urc_msg_id_enum msg, const void *data, int data_len);

 int mbtk_signal_log(char *data);

 

 /* Called on command thread */

@@ -79,7 +81,7 @@
 static int metis_strptime(char *str_time)

 {

     struct tm stm;

-    char dateTime[30];

+//    char dateTime[30];

     struct timeval tv;

     if(strptime(str_time, "%Y-%m-%d %H:%M:%S",&stm) != NULL)

     {

@@ -155,7 +157,7 @@
     if(is_first_boot) {

         if(access(MBTK_BOOT_NET_READY , X_OK) == 0) {

             LOGD("Exec : %s", MBTK_BOOT_NET_READY);

-            system(MBTK_BOOT_NET_READY);

+            mbtk_system(MBTK_BOOT_NET_READY);

         } else {

             LOGE("%s can not exec.", MBTK_BOOT_NET_READY);

         }

@@ -432,7 +434,7 @@
     else if(strStartsWith(s, "+CGREG:")     // GMS/WCDMA data registed.

          || strStartsWith(s, "+CEREG:"))    // LTE data registed.

     {

-        char* tmp_s = s + 7;

+        const char* tmp_s = s + 7;

         static bool net_led_gms_wcdma = FALSE;

         static bool net_led_lte = FALSE;

         while(*tmp_s && *tmp_s == ' ')

@@ -1524,6 +1526,7 @@
     return sock;

 }

 

+#if 0

 static void ril_get_cgpaddr_ip_process()

 {

     int err, skip;

@@ -1592,6 +1595,7 @@
 error:

     at_response_free(p_response);

 }

+#endif

 

 static void sim_state_change(bool plug_in) {

     if(plug_in) {

@@ -1761,6 +1765,7 @@
 int InProduction_Mode(void);

 void server_ready_set(void);

 

+#if 0

 
 /*
  *Get mtdblock which name is ASR_FLAG
@@ -1795,7 +1800,7 @@
 	fclose(fd);
 	return ((find == 1) ? 0 : -1);

 }
-
+

 static int readFromMTD(const char *path, unsigned int offset, void *buf, int size)

 {
 	int ret, fd;
@@ -1850,7 +1855,7 @@
 	close(fd);
 	return 0;
 }

-

+#endif

 static void fota_result_check()

 {

 #if 0

@@ -1886,7 +1891,7 @@
     if(is_first_boot) {

         if(access(MBTK_BOOT_SERVER_READY , X_OK) == 0) {

             LOGD("Exec : %s", MBTK_BOOT_SERVER_READY);

-            system(MBTK_BOOT_SERVER_READY);

+            mbtk_system(MBTK_BOOT_SERVER_READY);

         } else {

             LOGE("%s can not exec.", MBTK_BOOT_SERVER_READY);

         }

@@ -1918,7 +1923,7 @@
 

     int fd = open(MBTK_RILD_TEMP_FILE, O_CREAT | O_RDWR, 0644);

     if(fd > 0) {

-        char buff[10] = {0};

+        char buff[100] = {0};

         int count = 0;

         if(read(fd, buff, sizeof(buff)) > 0) {

             count = atoi(buff);

@@ -1936,7 +1941,7 @@
         count++;

         memset(buff, 0, sizeof(buff));

         snprintf(buff, sizeof(buff), "%d", count);

-        write(fd, buff, strlen(buff));

+        mbtk_write(fd, buff, strlen(buff));

         close(fd);

     } else {

         is_first_boot = FALSE;